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

openssl: remove build-time dependency to host perl #83446

wants to merge 1 commit into
base: staging


Copy link

@oxalica oxalica commented Mar 26, 2020

Motivation for this change

The related code is introduced in #50926 (issue: #50921).
But now the perl script c_rehash produced by openssl.bin has shebang #!/usr/bin/env perl, which means we don't need to substitute it anymore.

Removing the occurrence of ${perl} in build script also strip the build-time dependency to host-platform perl, which is actually unused in runtime. This is helpful when cross-compiling openssl, since we don't need to build cross- perl anymore.

Note that this PR produce identical outputs (except hashes) to the current ones.

May fix #19965.

Check build dependencies when cross-compiling:

> nix-store -q --references ${$(nix-instantiate . -A pkgsCross.armv7l-hf-multiplatform.openssl)%%\!*}

Before the PR: (contains perl-5.30.1-armv7l-unknown-linux-gnueabihf)


After the PR: (perl-arm is gone)

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
      • openssl
      • pkgsCross.armv7l-hf-multiplatform.openssl
      • with import ./. {
          crossSystem = {
             config = "mips-unknown-linux-musl";
             platform.gcc = { abi = "32"; arch = "mips32r2"; };
        }; openssl
  • 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)
    • Identical outputs (except hashes).
  • Ensured that relevant documentation is up to date
  • Fits
Copy link
Contributor Author

@oxalica oxalica commented Mar 26, 2020

r? @peti

Copy link

@gnprice gnprice commented Apr 4, 2020

May fix #19965.

I think in fact the news is still better than that: I believe #19665 was fixed by the same upstream change that makes this change possible. #19965 (comment)

Copy link
Contributor Author

@oxalica oxalica commented Apr 16, 2020

ping @peti

Copy link

@nixos-discourse nixos-discourse commented Jun 23, 2020

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Needs review
Linked issues

Successfully merging this pull request may close these issues.

None yet

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