Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL2: Add withStatic option #88519

Merged

Conversation

karolchmist
Copy link
Member

Motivation for this change

Build of the package devilutionx fails.

The error message:

make[2]: *** No rule to make target '/nix/store/slyxpxxprgdq3x54nanqg7sd3wg1cks7-SDL2-2.0.12/lib/libSDL2main.a', needed by 'devilutionx'.  Stop.

From my limited understanding of the build process, this is due probably to this commit, which stopped moving /libSDL2main.a to $dev folder.

The same commit added a possibility of removing *.la files insteaf of *.a files. It can be done by setting dontDisableStatic flag, but curiously it is not possible to set this flag for SDL2. Or maybe I'm missing something...

This PR adds a new parameter to SDL2: withStatic ? false. It is used to set dontDisableStatic = withStatic;. By default, if not used, it won't change the current behaviour. Setting it to true for the build of devolutionx fixes the build on my machine.

dontDisableStatic = withStatic; exists in other packages, and inspired this solution.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Pinging @cpages, the maintainer, and @nh2, who committed 57908c1

@cpages
Copy link
Contributor

cpages commented Jun 7, 2020

Thanks and sorry for the delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants