splice.nix: make pkgs splicedPackages (#349316)

This commit is contained in:
Artturin
2024-12-06 18:49:32 +02:00
committed by GitHub
5 changed files with 8 additions and 18 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
{ lib, __splicedPackages, erlang }:
{ lib, pkgs, erlang }:
let
pkgs = __splicedPackages;
inherit (lib) makeExtensible;
lib' = pkgs.callPackage ./lib.nix { };
+1 -4
View File
@@ -1,8 +1,5 @@
{ __splicedPackages, lib }:
{ pkgs, lib }:
let
pkgs = __splicedPackages;
in
rec {
/* Similar to callPackageWith/callPackage, but without makeOverridable
@@ -19,11 +19,7 @@ let
# - adds spliced package sets to the package set
({ stdenv, pkgs, perl, callPackage, makeScopeWithSplicing' }: let
perlPackagesFun = callPackage ../../../top-level/perl-packages.nix {
# allow 'perlPackages.override { pkgs = pkgs // { imagemagick = imagemagickBig; }; }' like in python3Packages
# most perl packages aren't called with callPackage so it's not possible to override their arguments individually
# the conditional is because the // above won't be applied to __splicedPackages and hopefully no one is doing that when cross-compiling
pkgs = if stdenv.buildPlatform != stdenv.hostPlatform then pkgs.__splicedPackages else pkgs;
inherit stdenv;
inherit stdenv pkgs;
perl = self;
};
+3 -7
View File
@@ -5393,9 +5393,7 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Security;
};
tmuxPlugins = recurseIntoAttrs (callPackage ../misc/tmux-plugins {
pkgs = pkgs.__splicedPackages;
});
tmuxPlugins = recurseIntoAttrs (callPackage ../misc/tmux-plugins { });
tokei = callPackage ../development/tools/misc/tokei {
inherit (darwin.apple_sdk.frameworks) Security;
@@ -5756,7 +5754,7 @@ with pkgs;
yarn-berry = callPackage ../development/tools/yarn-berry { };
yarn2nix-moretea = callPackage ../development/tools/yarn2nix-moretea/yarn2nix { pkgs = pkgs.__splicedPackages; };
yarn2nix-moretea = callPackage ../development/tools/yarn2nix-moretea/yarn2nix { };
inherit (yarn2nix-moretea)
yarn2nix
@@ -6463,7 +6461,6 @@ with pkgs;
idrisPackages = dontRecurseIntoAttrs (callPackage ../development/idris-modules {
idris-no-deps = haskellPackages.idris;
pkgs = pkgs.__splicedPackages;
});
idris = idrisPackages.with-packages [ idrisPackages.base ] ;
@@ -16947,8 +16944,7 @@ with pkgs;
openmw-tes3mp = libsForQt5.callPackage ../games/openmw/tes3mp.nix { };
openraPackages_2019 = import ../games/openra_2019 {
inherit lib;
pkgs = pkgs.__splicedPackages;
inherit lib pkgs;
};
openra_2019 = openraPackages_2019.engines.release;
+2
View File
@@ -151,6 +151,8 @@ in
newScope = extra: lib.callPackageWith (pkgsForCall // extra);
pkgs = if actuallySplice then splicedPackages // { recurseForDerivations = false; } else pkgs;
# prefill 2 fields of the function for convenience
makeScopeWithSplicing = lib.makeScopeWithSplicing splicePackages pkgs.newScope;
makeScopeWithSplicing' = lib.makeScopeWithSplicing' { inherit splicePackages; inherit (pkgs) newScope; };