-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
oniguruma: set CMake flags for static builds #75950
Conversation
pkgs/top-level/static.nix
Outdated
@@ -243,4 +243,6 @@ in { | |||
) super.ocaml-ng; | |||
|
|||
python27 = super.python27.override { static = true; }; | |||
|
|||
oniguruma = super.oniguruma.overrideAttrs (_: { cmakeFlags = ["-DBUILD_SHARED_LIBS=OFF"]; }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is more standard for these sort of per-package overrides to be documented in the package definition itself. That said, I'm not certain why these other ones are in here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I thought this was the convention. What's a good model for me to refer to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typically you add an explicit static
(or staticOnly
) parameter to the package expression. Take a look at brotli, you should be able to copy the flags handling verbatim.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Building pkgsStatic.jq
works thanks to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't realize this would introduce a lot of rebuilds for the non-static variant too. This PR should target staging now.
I've switched to targeting staging, so this should be ready for a re-review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine from my pov. Maybe someone with commit bits can do a final check?
cc @matthewbauer @nh2
Related: #76659 |
Since #76659 was merged (to staging), I don't think this is needed anymore. |
Motivation for this change
This change makes it possible to build oniguruma statically, based on what I found in the CMakeLists.txt. Ultimately this unblocks my building PHP 7.4 statically (since multibyte support requires oniguruma now).
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @