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

oniguruma: set CMake flags for static builds #75950

Closed
wants to merge 2 commits into from

Conversation

@gustavderdrache
Copy link
Contributor

@gustavderdrache gustavderdrache commented Dec 19, 2019

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
  • 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 nix-review --run "nix-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.
Notify maintainers

cc @

@@ -243,4 +243,6 @@ in {
) super.ocaml-ng;

python27 = super.python27.override { static = true; };

oniguruma = super.oniguruma.overrideAttrs (_: { cmakeFlags = ["-DBUILD_SHARED_LIBS=OFF"]; });

This comment has been minimized.

@grahamc

grahamc Dec 19, 2019
Member

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 :)

This comment has been minimized.

@gustavderdrache

gustavderdrache Dec 19, 2019
Author Contributor

Oops, I thought this was the convention. What's a good model for me to refer to?

This comment has been minimized.

@tobim

tobim Dec 21, 2019
Contributor

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.

@tobim
tobim approved these changes Dec 22, 2019
Copy link
Contributor

@tobim tobim left a comment

Building pkgsStatic.jq works thanks to this.

Copy link
Contributor

@tobim tobim left a comment

I didn't realize this would introduce a lot of rebuilds for the non-static variant too. This PR should target staging now.

@gustavderdrache gustavderdrache changed the base branch from master to staging Dec 23, 2019
@gustavderdrache
Copy link
Contributor Author

@gustavderdrache gustavderdrache commented Dec 23, 2019

I've switched to targeting staging, so this should be ready for a re-review.

@tobim
tobim approved these changes Dec 28, 2019
Copy link
Contributor

@tobim tobim left a comment

This looks fine from my pov. Maybe someone with commit bits can do a final check?
cc @matthewbauer @nh2

@knedlsepp
Copy link
Member

@knedlsepp knedlsepp commented Jan 2, 2020

Related: #76659

@knedlsepp
Copy link
Member

@knedlsepp knedlsepp commented Jan 6, 2020

Since #76659 was merged (to staging), I don't think this is needed anymore.

@veprbl veprbl closed this Jan 6, 2020
@gustavderdrache gustavderdrache deleted the gustavderdrache:static-oniguruma branch Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.