Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/customisation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/interpreters/python/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ with pkgs;
recursivePthLoader
;
};
in lib.makeScopeWithSplicing
pkgs.splicePackages
pkgs.newScope
in pkgs.makeScopeWithSplicing
otherSplices
keep
(lib.extends overrides pythonPackagesFun))
Expand Down
11 changes: 11 additions & 0 deletions pkgs/top-level/splice.nix
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,17 @@ in

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

makeScopeWithSplicing = lib.makeScopeWithSplicing splicePackages pkgs.newScope;

topProjectedSpliced = attr: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps split attr on dots to allow for nested sets?

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; };
Expand Down