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

cmake: Tighten deps #99401

Merged
merged 4 commits into from
Oct 14, 2020
Merged

Conversation

Ericson2314
Copy link
Member

Motivation for this change
  • OpenSSL is evidentally an optional dep. I guess pkg-config found it
    before because it was a transitive dep?

  • zstd and cross-built CMake can get by with a `cmakeMinimal that we
    use during bootstrapping, so let's restrict to that.

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.

pkg-config now has a target-sensative wrapper. We shouldn't rebuild
CMake because that wrapper changes. The setup hook should also be a
build time dep.

Fix NixOS#99325
 - OpenSSL is evidentally an optional dep. I guess pkg-config found it
   before because it was a transitive dep?

 - `zstd` and cross-built CMake can get by with a `cmakeMinimal that we
   use during bootstrapping, so let's restrict to that.
@FRidh
Copy link
Member

FRidh commented Oct 6, 2020

Don't we put overrides for bootstrapping elsewhere?

@vcunat
Copy link
Member

vcunat commented Oct 6, 2020

If it's more complex, I think it's better to keep an option in the expression itself, as it's less likely that a change will clash with those overrides.

EDIT: though here it just switches defaults to other parameters (and pname which seems a nit). Still, removing the parameter should be a separate commit and maybe even separate PR (doesn't seem important to me anyway).

@Ericson2314
Copy link
Member Author

Yeah the Darwin bootstrapping just used the isBootstrap defined here.

@ofborg ofborg bot added the 6.topic: stdenv Standard environment label Oct 13, 2020
@Ericson2314
Copy link
Member Author

Ofborg is stalled, but I built the Darwin stdenv by hand.

@Ericson2314 Ericson2314 merged commit e54f6b1 into NixOS:staging Oct 14, 2020
@Ericson2314 Ericson2314 deleted the cmake-optional-openssl branch October 14, 2020 02:13
@vcunat
Copy link
Member

vcunat commented Oct 17, 2020

Ofborg for darwin is a "known problem": NixOS/ofborg#529 (comment)

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.

3 participants