Skip to content
Permalink
Browse files
WIP: treewide: splice more nested package sets
So far this just has some functions that might come in handy. Next step
is to find package sets that provide things used as non-buildInputs
(most of them seem to not fit that?).

I've always hated this splicing monster. Maybe others can tell me where
this might be worth it.

CC @FRidh @globin
  • Loading branch information
Ericson2314 committed Nov 29, 2020
1 parent 2868e69 commit 358d62868d9270c724c5bc342cda81e45fbac8c2
Showing with 13 additions and 3 deletions.
  1. +1 −0 lib/customisation.nix
  2. +1 −3 pkgs/development/interpreters/python/default.nix
  3. +11 −0 pkgs/top-level/splice.nix
@@ -231,6 +231,7 @@ rec {
} // keep self;
self = f self // {
newScope = scope: newScope (spliced // scope);
makeScopeWithSplicing = makeScopeWithSplicing splicePackages self.newScope;
callPackage = newScope spliced; # == self.newScope {};
# N.B. the other stages of the package set spliced in are *not*
# overridden.
@@ -69,9 +69,7 @@ with pkgs;
recursivePthLoader
;
};
in lib.makeScopeWithSplicing
pkgs.splicePackages
pkgs.newScope
in pkgs.makeScopeWithSplicing
otherSplices
keep
(lib.extends overrides pythonPackagesFun))
@@ -131,6 +131,17 @@ in

newScope = extra: lib.callPackageWith (splicedPackagesWithXorg // extra);

makeScopeWithSplicing = lib.makeScopeWithSplicing splicePackages pkgs.newScope;

topProjectedSpliced = attr: {
selfBuildBuild = pkgs.pkgsBuildBuild.${attr};
selfBuildHost = pkgs.pkgsBuildHost.${attr};
selfBuildTarget = pkgs.pkgsBuildTarget.${attr};
selfHostHost = pkgs.pkgsHostHost.${attr};
selfHostTarget = pkgs.pkgsHostTarget.${attr};
selfTargetTarget = pkgs.pkgsTargetTarget.${attr} or {};
};

# Haskell package sets need this because they reimplement their own
# `newScope`.
__splicedPackages = splicedPackages // { recurseForDerivations = false; };

0 comments on commit 358d628

Please sign in to comment.