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

cacert: simplify setupHook #68614

Merged
merged 1 commit into from Sep 20, 2019

Conversation

nspin
Copy link
Contributor

@nspin nspin commented Sep 12, 2019

Currently, the cacert setupHook, which sets NIX_SSL_CERT_FILE, triggers for each dependency at $targetOffset. It does not trigger in cases where there are no such dependencies. When not cross-compiling, cacert triggers on itself, but, when cross compiling, a dependency at $targetOffset is often lacking.

I propose directly setting NIX_SSL_CERT_FILE in the setupHook, but perhaps there is a more idiomatic way of implementing this sort of hook.

Motivation for this change

To make the cacert setupHook more robust, particularly in the case of cross-compilation.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 @

Triggering this setupHook for dependencies at targetOffset does not work
in cross-compilation cases where such a dependency is lacking. This
simplified setupHook is more robust.
@Ericson2314
Copy link
Member

Nice. It never used it's arguments so there was little point of it being an env hook to begin with.

@nspin nspin deleted the pr/simplify-cacert-setup-hook branch September 24, 2019 17:42
dtzWill pushed a commit to dtzWill/nixpkgs that referenced this pull request Oct 22, 2019
cacert: simplify setupHook
(cherry picked from commit f7e4eed)
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

3 participants