diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2021-05-04 00:08:20 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2021-05-06 11:17:26 -0400 |
commit | 470640e7fe53ab57396cff6698125f5bf137b4de (patch) | |
tree | 997d59f58f7def8d04cdafbe5e30e6e59881bb81 /lib | |
parent | b418e17a4ccf42b1a99aa6eca2b86a5b552d081a (diff) | |
download | nixpkgs-470640e7fe53ab57396cff6698125f5bf137b4de.tar nixpkgs-470640e7fe53ab57396cff6698125f5bf137b4de.tar.gz nixpkgs-470640e7fe53ab57396cff6698125f5bf137b4de.tar.bz2 nixpkgs-470640e7fe53ab57396cff6698125f5bf137b4de.tar.lz nixpkgs-470640e7fe53ab57396cff6698125f5bf137b4de.tar.xz nixpkgs-470640e7fe53ab57396cff6698125f5bf137b4de.tar.zst nixpkgs-470640e7fe53ab57396cff6698125f5bf137b4de.zip |
treewide: Do a number of no-op cleanups for cross and darwin
I am taking the non-invasive parts of #110914 to hopefully help out with #111988. In particular: - Use `lib.makeScopeWithSplicing` to make the `darwin` package set have a proper `callPackage`. - Adjust Darwin `stdenv`'s overlays keeping things from the previous stage to not stick around too much. - Expose `binutilsNoLibc` / `darwin.binutilsNoLibc` to hopefully get us closer to a unified LLVM and GCC bootstrap.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/customisation.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/customisation.nix b/lib/customisation.nix index 37a7951896b..c17cb0d0f8e 100644 --- a/lib/customisation.nix +++ b/lib/customisation.nix @@ -219,16 +219,17 @@ rec { /* Like the above, but aims to support cross compilation. It's still ugly, but hopefully it helps a little bit. */ - makeScopeWithSplicing = splicePackages: newScope: otherSplices: keep: f: + makeScopeWithSplicing = splicePackages: newScope: otherSplices: keep: extra: f: let - spliced = splicePackages { + spliced0 = splicePackages { pkgsBuildBuild = otherSplices.selfBuildBuild; pkgsBuildHost = otherSplices.selfBuildHost; pkgsBuildTarget = otherSplices.selfBuildTarget; pkgsHostHost = otherSplices.selfHostHost; pkgsHostTarget = self; # Not `otherSplices.selfHostTarget`; pkgsTargetTarget = otherSplices.selfTargetTarget; - } // keep self; + }; + spliced = extra spliced0 // spliced0 // keep self; self = f self // { newScope = scope: newScope (spliced // scope); callPackage = newScope spliced; # == self.newScope {}; @@ -239,6 +240,7 @@ rec { newScope otherSplices keep + extra (lib.fixedPoints.extends g f); packages = f; }; |