treewide: use uncurried version of makeScopeWithSplicing

authored by Adam Joseph and committed by Artturin cbc8aa43 a1fdbae7

+58 -71
+6 -12
pkgs/desktops/xfce/default.nix
··· 2 2 , lib 3 3 , pkgs 4 4 , generateSplicesForMkScope 5 - , makeScopeWithSplicing 5 + , makeScopeWithSplicing' 6 6 }: 7 7 8 - let 9 - keep = _self: { }; 10 - extra = _spliced0: { }; 11 - 12 - in 13 - makeScopeWithSplicing 14 - (generateSplicesForMkScope "xfce") 15 - keep 16 - extra 17 - (self: 8 + makeScopeWithSplicing' { 9 + otherSplices = generateSplicesForMkScope "xfce"; 10 + f = (self: 18 11 let 19 12 inherit (self) callPackage; 20 13 in ··· 177 170 thunar-bare = self.thunar.override { thunarPlugins = [ ]; }; # added 2019-11-04 178 171 179 172 xfce4-hardware-monitor-plugin = throw "xfce.xfce4-hardware-monitor-plugin has been removed: abandoned by upstream and does not build"; # added 2023-01-15 180 - }) 173 + }); 174 + }
+5 -8
pkgs/development/interpreters/lua-5/default.nix
··· 23 23 # - imports lua-packages.nix 24 24 # - adds spliced package sets to the package set 25 25 # - applies overrides from `packageOverrides` 26 - ({ lua, overrides, callPackage, makeScopeWithSplicing }: let 26 + ({ lua, overrides, callPackage, makeScopeWithSplicing' }: let 27 27 luaPackagesFun = callPackage ../../../top-level/lua-packages.nix { 28 28 lua = self; 29 29 }; ··· 39 39 selfHostHost = luaOnHostForHost.pkgs; 40 40 selfTargetTarget = luaOnTargetForTarget.pkgs or {}; 41 41 }; 42 - keep = self: { }; 43 - extra = spliced0: {}; 44 42 extensions = lib.composeManyExtensions [ 45 43 generatedPackages 46 44 overriddenPackages 47 45 overrides 48 46 ]; 49 - in makeScopeWithSplicing 50 - otherSplices 51 - keep 52 - extra 53 - (lib.extends extensions luaPackagesFun)) 47 + in makeScopeWithSplicing' { 48 + inherit otherSplices; 49 + f = lib.extends extensions luaPackagesFun; 50 + }) 54 51 { 55 52 overrides = packageOverrides; 56 53 lua = self;
+5 -8
pkgs/development/interpreters/perl/default.nix
··· 17 17 # Function that when called 18 18 # - imports perl-packages.nix 19 19 # - adds spliced package sets to the package set 20 - ({ stdenv, pkgs, perl, callPackage, makeScopeWithSplicing }: let 20 + ({ stdenv, pkgs, perl, callPackage, makeScopeWithSplicing' }: let 21 21 perlPackagesFun = callPackage ../../../top-level/perl-packages.nix { 22 22 # allow 'perlPackages.override { pkgs = pkgs // { imagemagick = imagemagickBig; }; }' like in python3Packages 23 23 # most perl packages aren't called with callPackage so it's not possible to override their arguments individually ··· 34 34 selfHostHost = perlOnHostForHost.pkgs; 35 35 selfTargetTarget = perlOnTargetForTarget.pkgs or {}; 36 36 }; 37 - keep = self: { }; 38 - extra = spliced0: {}; 39 - in makeScopeWithSplicing 40 - otherSplices 41 - keep 42 - extra 43 - perlPackagesFun) 37 + in makeScopeWithSplicing' { 38 + inherit otherSplices; 39 + f = perlPackagesFun; 40 + }) 44 41 { 45 42 perl = self; 46 43 };
+1 -1
pkgs/development/interpreters/python/default.nix
··· 5 5 , db 6 6 , lib 7 7 , libffiBoot 8 - , makeScopeWithSplicing 8 + , makeScopeWithSplicing' 9 9 , pythonPackagesExtensions 10 10 , stdenv 11 11 }@args:
+5 -8
pkgs/development/interpreters/python/passthrufun.nix
··· 1 - { lib, stdenv, callPackage, pythonPackagesExtensions, config, makeScopeWithSplicing, ... }: 1 + { lib, stdenv, callPackage, pythonPackagesExtensions, config, makeScopeWithSplicing', ... }: 2 2 3 3 { implementation 4 4 , libPrefix ··· 48 48 }; 49 49 hooks = import ./hooks/default.nix; 50 50 keep = lib.extends hooks pythonPackagesFun; 51 - extra = _: {}; 52 51 optionalExtensions = cond: as: lib.optionals cond as; 53 52 pythonExtension = import ../../../top-level/python-packages.nix; 54 53 python2Extension = import ../../../top-level/python2-packages.nix; ··· 60 59 overrides 61 60 ]); 62 61 aliases = self: super: lib.optionalAttrs config.allowAliases (import ../../../top-level/python-aliases.nix lib self super); 63 - in makeScopeWithSplicing 64 - otherSplices 65 - keep 66 - extra 67 - (lib.extends (lib.composeExtensions aliases extensions) keep)) 68 - { 62 + in makeScopeWithSplicing' { 63 + inherit otherSplices keep; 64 + f = lib.extends (lib.composeExtensions aliases extensions) keep; 65 + }) { 69 66 overrides = packageOverrides; 70 67 python = self; 71 68 });
+5 -2
pkgs/development/libraries/qt-5/5.15/default.nix
··· 7 7 8 8 */ 9 9 10 - { makeScopeWithSplicing, generateSplicesForMkScope 10 + { makeScopeWithSplicing', generateSplicesForMkScope 11 11 , lib, stdenv, fetchurl, fetchgit, fetchpatch, fetchFromGitHub, makeSetupHook, makeWrapper 12 12 , bison, cups ? null, harfbuzz, libGL, perl, python3 13 13 , gstreamer, gst-plugins-base, gtk3, dconf ··· 331 331 } ../hooks/wrap-qt-apps-hook.sh; 332 332 }; 333 333 334 - in makeScopeWithSplicing (generateSplicesForMkScope "qt5") (_: {}) (_: {}) addPackages 334 + in makeScopeWithSplicing' { 335 + otherSplices = generateSplicesForMkScope "qt5"; 336 + f = addPackages; 337 + }
+1 -1
pkgs/development/libraries/qt-6/default.nix
··· 166 166 } ./hooks/qmake-hook.sh; 167 167 }; 168 168 169 - # TODO(@Artturin): convert to makeScopeWithSplicing 169 + # TODO(@Artturin): convert to makeScopeWithSplicing' 170 170 # simple example of how to do that in 5568a4d25ca406809530420996d57e0876ca1a01 171 171 self = lib.makeScope newScope addPackages; 172 172 in
+5 -4
pkgs/games/steam/default.nix
··· 1 - { makeScopeWithSplicing, generateSplicesForMkScope 1 + { makeScopeWithSplicing', generateSplicesForMkScope 2 2 , stdenv, buildFHSEnv, pkgsi686Linux, glxinfo 3 3 }: 4 4 ··· 32 32 33 33 steamcmd = callPackage ./steamcmd.nix { }; 34 34 }; 35 - keep = self: { }; 36 - extra = spliced0: { }; 37 - in makeScopeWithSplicing (generateSplicesForMkScope "steamPackages") keep extra steamPackagesFun 35 + in makeScopeWithSplicing' { 36 + otherSplices = generateSplicesForMkScope "steamPackages"; 37 + f = steamPackagesFun; 38 + }
+6 -7
pkgs/os-specific/bsd/freebsd/default.nix
··· 1 1 { stdenv, lib, stdenvNoCC 2 - , makeScopeWithSplicing, generateSplicesForMkScope 2 + , makeScopeWithSplicing', generateSplicesForMkScope 3 3 , buildPackages 4 4 , bsdSetupHook, makeSetupHook 5 5 , fetchgit, fetchzip, coreutils, groff, mandoc, byacc, flex, which, m4, gawk, substituteAll, runtimeShell ··· 66 66 done 67 67 ''; 68 68 69 - in makeScopeWithSplicing 70 - (generateSplicesForMkScope "freebsd") 71 - (_: {}) 72 - (_: {}) 73 - (self: let 69 + in makeScopeWithSplicing' { 70 + otherSplices = generateSplicesForMkScope "freebsd"; 71 + f = (self: let 74 72 inherit (self) mkDerivation; 75 73 in { 76 74 inherit freebsdSrc; ··· 898 896 ''; 899 897 }); 900 898 901 - }) 899 + }); 900 + }
+7 -8
pkgs/os-specific/bsd/netbsd/default.nix
··· 1 1 { stdenv, lib, stdenvNoCC 2 - , makeScopeWithSplicing, generateSplicesForMkScope 2 + , makeScopeWithSplicing', generateSplicesForMkScope 3 3 , buildPackages 4 4 , bsdSetupHook, makeSetupHook, fetchcvs, groff, mandoc, byacc, flex 5 5 , zlib ··· 26 26 else "no"}" 27 27 ]; 28 28 29 - in makeScopeWithSplicing 30 - (generateSplicesForMkScope "netbsd") 31 - (_: {}) 32 - (_: {}) 33 - (self: let 29 + in makeScopeWithSplicing' { 30 + otherSplices = generateSplicesForMkScope "netbsd"; 31 + f = (self: let 34 32 inherit (self) mkDerivation; 35 33 in { 36 34 37 35 # Why do we have splicing and yet do `nativeBuildInputs = with self; ...`? 38 36 # 39 - # We use `makeScopeWithSplicing` because this should be used for all 37 + # We use `makeScopeWithSplicing'` because this should be used for all 40 38 # nested package sets which support cross, so the inner `callPackage` works 41 39 # correctly. But for the inline packages we don't bother to use 42 40 # `callPackage`. ··· 1011 1009 # END MISCELLANEOUS 1012 1010 # 1013 1011 1014 - }) 1012 + }); 1013 + }
+5 -9
pkgs/top-level/all-packages.nix
··· 24479 24479 qt5 = recurseIntoAttrs (makeOverridable 24480 24480 (import ../development/libraries/qt-5/5.15) { 24481 24481 inherit (__splicedPackages) 24482 - makeScopeWithSplicing generateSplicesForMkScope lib fetchurl fetchpatch fetchgit fetchFromGitHub makeSetupHook makeWrapper 24482 + makeScopeWithSplicing' generateSplicesForMkScope lib fetchurl fetchpatch fetchgit fetchFromGitHub makeSetupHook makeWrapper 24483 24483 bison cups dconf harfbuzz libGL perl gtk3 python3 24484 24484 darwin buildPackages; 24485 24485 inherit (__splicedPackages.gst_all_1) gstreamer gst-plugins-base; ··· 27317 27317 }; 27318 27318 27319 27319 xorg = let 27320 - keep = _self: { }; 27321 - extra = _spliced0: { }; 27322 - 27323 27320 # Use `lib.callPackageWith __splicedPackages` rather than plain `callPackage` 27324 27321 # so as not to have the newly bound xorg items already in scope, which would 27325 27322 # have created a cycle. ··· 27334 27331 27335 27332 generatedPackages = lib.callPackageWith __splicedPackages ../servers/x11/xorg/default.nix { }; 27336 27333 27337 - xorgPackages = makeScopeWithSplicing 27338 - (generateSplicesForMkScope "xorg") 27339 - keep 27340 - extra 27341 - (lib.extends overrides generatedPackages); 27334 + xorgPackages = makeScopeWithSplicing' { 27335 + otherSplices = generateSplicesForMkScope "xorg"; 27336 + f = lib.extends overrides generatedPackages; 27337 + }; 27342 27338 27343 27339 in recurseIntoAttrs xorgPackages; 27344 27340
+7 -3
pkgs/top-level/darwin-packages.nix
··· 1 1 { lib 2 2 , buildPackages, pkgs, targetPackages 3 - , generateSplicesForMkScope, makeScopeWithSplicing 3 + , generateSplicesForMkScope, makeScopeWithSplicing' 4 4 , stdenv 5 5 , preLibcCrossHeaders 6 6 , config ··· 15 15 (stdenv.targetPlatform.config + "-"); 16 16 in 17 17 18 - makeScopeWithSplicing (generateSplicesForMkScope "darwin") (_: {}) (spliced: spliced.apple_sdk.frameworks) (self: let 18 + makeScopeWithSplicing' { 19 + otherSplices = generateSplicesForMkScope "darwin"; 20 + extra = spliced: spliced.apple_sdk.frameworks; 21 + f = (self: let 19 22 inherit (self) mkDerivation callPackage; 20 23 21 24 # Must use pkgs.callPackage to avoid infinite recursion. ··· 251 254 252 255 } // lib.optionalAttrs config.allowAliases { 253 256 builder = throw "'darwin.builder' has been changed and renamed to 'darwin.linux-builder'. The default ssh port is now 31022. Please update your configuration or override the port back to 22. See https://nixos.org/manual/nixpkgs/unstable/#sec-darwin-builder"; # added 2023-07-06 254 - }) 257 + }); 258 + }