summaryrefslogtreecommitdiffstats
path: root/lib/customisation.nix
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-05-04 00:08:20 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-05-06 11:17:26 -0400
commit470640e7fe53ab57396cff6698125f5bf137b4de (patch)
tree997d59f58f7def8d04cdafbe5e30e6e59881bb81 /lib/customisation.nix
parentb418e17a4ccf42b1a99aa6eca2b86a5b552d081a (diff)
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/customisation.nix')
-rw-r--r--lib/customisation.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/customisation.nix b/lib/customisation.nix
index 37a7951896b0..c17cb0d0f8e5 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;
};