Merge pull request #56105 from oxij/tree/dont-recurse-into-attrs

all-packages.nix: introduce and use `dontRecurseIntoAttrs`
This commit is contained in:
Michael Raskin 2019-02-23 09:56:31 +00:00 committed by GitHub
commit acf9a579ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,6 +69,14 @@ in
# inside the set for derivations. # inside the set for derivations.
recurseIntoAttrs = attrs: attrs // { recurseForDerivations = true; }; recurseIntoAttrs = attrs: attrs // { recurseForDerivations = true; };
# This is intended to be the reverse of recurseIntoAttrs, as it is
# defined now it exists mainly for documentation purposes, but you
# can also override this with recurseIntoAttrs to recurseInto all
# the Attrs which is useful for testing massive changes. Ideally,
# every package subset not marked with recurseIntoAttrs should be
# marked with this.
dontRecurseIntoAttrs = x: x;
stringsWithDeps = lib.stringsWithDeps; stringsWithDeps = lib.stringsWithDeps;
### Evaluating the entire Nixpkgs naively will fail, make failure fast ### Evaluating the entire Nixpkgs naively will fail, make failure fast
@ -1654,7 +1662,7 @@ in
roundcube = callPackage ../servers/roundcube { }; roundcube = callPackage ../servers/roundcube { };
roundcubePlugins = callPackage ../servers/roundcube/plugins { }; roundcubePlugins = dontRecurseIntoAttrs (callPackage ../servers/roundcube/plugins { });
rsbep = callPackage ../tools/backup/rsbep { }; rsbep = callPackage ../tools/backup/rsbep { };
@ -2456,7 +2464,7 @@ in
emscripten = callPackage ../development/compilers/emscripten { }; emscripten = callPackage ../development/compilers/emscripten { };
emscriptenfastcompPackages = callPackage ../development/compilers/emscripten/fastcomp { }; emscriptenfastcompPackages = dontRecurseIntoAttrs (callPackage ../development/compilers/emscripten/fastcomp { });
emscriptenfastcomp = emscriptenfastcompPackages.emscriptenfastcomp; emscriptenfastcomp = emscriptenfastcompPackages.emscriptenfastcomp;
@ -2790,9 +2798,9 @@ in
fusuma = callPackage ../tools/inputmethods/fusuma {}; fusuma = callPackage ../tools/inputmethods/fusuma {};
fdbPackages = callPackage ../servers/foundationdb { fdbPackages = dontRecurseIntoAttrs (callPackage ../servers/foundationdb {
stdenv49 = overrideCC stdenv gcc49; stdenv49 = overrideCC stdenv gcc49;
}; });
inherit (fdbPackages) inherit (fdbPackages)
foundationdb51 foundationdb51
@ -3892,17 +3900,17 @@ in
openssl = openssl_1_1; openssl = openssl_1_1;
}; };
nodePackages_10_x = callPackage ../development/node-packages/default-v10.nix { nodePackages_10_x = dontRecurseIntoAttrs (callPackage ../development/node-packages/default-v10.nix {
nodejs = pkgs.nodejs-10_x; nodejs = pkgs.nodejs-10_x;
}; });
nodePackages_8_x = callPackage ../development/node-packages/default-v8.nix { nodePackages_8_x = dontRecurseIntoAttrs (callPackage ../development/node-packages/default-v8.nix {
nodejs = pkgs.nodejs-8_x; nodejs = pkgs.nodejs-8_x;
}; });
nodePackages_6_x = callPackage ../development/node-packages/default-v6.nix { nodePackages_6_x = dontRecurseIntoAttrs (callPackage ../development/node-packages/default-v6.nix {
nodejs = pkgs.nodejs-6_x; nodejs = pkgs.nodejs-6_x;
}; });
nodePackages = nodePackages_10_x; nodePackages = nodePackages_10_x;
@ -4900,7 +4908,7 @@ in
plan9port = callPackage ../tools/system/plan9port { }; plan9port = callPackage ../tools/system/plan9port { };
platformioPackages = callPackage ../development/arduino/platformio { }; platformioPackages = dontRecurseIntoAttrs (callPackage ../development/arduino/platformio { });
platformio = platformioPackages.platformio-chrootenv; platformio = platformioPackages.platformio-chrootenv;
platinum-searcher = callPackage ../tools/text/platinum-searcher { }; platinum-searcher = callPackage ../tools/text/platinum-searcher { };
@ -7046,9 +7054,9 @@ in
haskell = callPackage ./haskell-packages.nix { }; haskell = callPackage ./haskell-packages.nix { };
haskellPackages = haskell.packages.ghc863.override { haskellPackages = dontRecurseIntoAttrs (haskell.packages.ghc863.override {
overrides = config.haskellPackageOverrides or haskell.packageOverrides; overrides = config.haskellPackageOverrides or haskell.packageOverrides;
}; });
inherit (haskellPackages) ghc; inherit (haskellPackages) ghc;
@ -7137,9 +7145,9 @@ in
icedtea_web = icedtea8_web; icedtea_web = icedtea8_web;
idrisPackages = callPackage ../development/idris-modules { idrisPackages = dontRecurseIntoAttrs (callPackage ../development/idris-modules {
idris-no-deps = haskellPackages.idris; idris-no-deps = haskellPackages.idris;
}; });
idris = idrisPackages.with-packages [ idrisPackages.base ] ; idris = idrisPackages.with-packages [ idrisPackages.base ] ;
@ -9093,7 +9101,7 @@ in
selendroid = callPackage ../development/tools/selenium/selendroid { }; selendroid = callPackage ../development/tools/selenium/selendroid { };
sconsPackages = callPackage ../development/tools/build-managers/scons { }; sconsPackages = dontRecurseIntoAttrs (callPackage ../development/tools/build-managers/scons { });
scons = sconsPackages.scons_latest; scons = sconsPackages.scons_latest;
mill = callPackage ../development/tools/build-managers/mill { }; mill = callPackage ../development/tools/build-managers/mill { };
@ -10071,7 +10079,7 @@ in
# A GMP fork # A GMP fork
mpir = callPackage ../development/libraries/mpir {}; mpir = callPackage ../development/libraries/mpir {};
gns3Packages = callPackage ../applications/networking/gns3 { }; gns3Packages = dontRecurseIntoAttrs (callPackage ../applications/networking/gns3 { });
gns3-gui = gns3Packages.guiStable; gns3-gui = gns3Packages.guiStable;
gns3-server = gns3Packages.serverStable; gns3-server = gns3Packages.serverStable;
@ -13327,8 +13335,8 @@ in
quicklispPackagesFor = clwrapper: callPackage ../development/lisp-modules/quicklisp-to-nix.nix { quicklispPackagesFor = clwrapper: callPackage ../development/lisp-modules/quicklisp-to-nix.nix {
inherit clwrapper; inherit clwrapper;
}; };
quicklispPackagesClisp = quicklispPackagesFor (wrapLisp clisp); quicklispPackagesClisp = dontRecurseIntoAttrs (quicklispPackagesFor (wrapLisp clisp));
quicklispPackagesSBCL = quicklispPackagesFor (wrapLisp sbcl); quicklispPackagesSBCL = dontRecurseIntoAttrs (quicklispPackagesFor (wrapLisp sbcl));
quicklispPackages = quicklispPackagesSBCL; quicklispPackages = quicklispPackagesSBCL;
quicklispPackages_asdf_3_1 = quicklispPackagesFor quicklispPackages_asdf_3_1 = quicklispPackagesFor
((wrapLisp sbcl).override { asdf = asdf_3_1; }); ((wrapLisp sbcl).override { asdf = asdf_3_1; });
@ -13390,9 +13398,9 @@ in
packages = []; packages = [];
}; };
rPackages = callPackage ../development/r-modules { rPackages = dontRecurseIntoAttrs (callPackage ../development/r-modules {
overrides = (config.rPackageOverrides or (p: {})) pkgs; overrides = (config.rPackageOverrides or (p: {})) pkgs;
}; });
### SERVERS ### SERVERS
@ -13427,7 +13435,7 @@ in
subversion = pkgs.subversion.override { httpServer = true; inherit apacheHttpd; }; subversion = pkgs.subversion.override { httpServer = true; inherit apacheHttpd; };
}; };
apacheHttpdPackages_2_4 = apacheHttpdPackagesFor pkgs.apacheHttpd_2_4 pkgs.apacheHttpdPackages_2_4; apacheHttpdPackages_2_4 = dontRecurseIntoAttrs (apacheHttpdPackagesFor pkgs.apacheHttpd_2_4 pkgs.apacheHttpdPackages_2_4);
apacheHttpdPackages = apacheHttpdPackages_2_4; apacheHttpdPackages = apacheHttpdPackages_2_4;
appdaemon = callPackage ../servers/home-assistant/appdaemon.nix { }; appdaemon = callPackage ../servers/home-assistant/appdaemon.nix { };
@ -14414,9 +14422,9 @@ in
inherit (linuxPackages) kernel; inherit (linuxPackages) kernel;
}; };
fusePackages = callPackage ../os-specific/linux/fuse { fusePackages = dontRecurseIntoAttrs (callPackage ../os-specific/linux/fuse {
utillinux = utillinuxMinimal; utillinux = utillinuxMinimal;
}; });
fuse = lowPrio fusePackages.fuse_2; fuse = lowPrio fusePackages.fuse_2;
fuse3 = fusePackages.fuse_3; fuse3 = fusePackages.fuse_3;
fuse-common = hiPrio fusePackages.fuse_3.common; fuse-common = hiPrio fusePackages.fuse_3.common;
@ -14705,7 +14713,7 @@ in
nvidiabl = callPackage ../os-specific/linux/nvidiabl { }; nvidiabl = callPackage ../os-specific/linux/nvidiabl { };
nvidiaPackages = callPackage ../os-specific/linux/nvidia-x11 { }; nvidiaPackages = dontRecurseIntoAttrs (callPackage ../os-specific/linux/nvidia-x11 { });
nvidia_x11_legacy304 = nvidiaPackages.legacy_304; nvidia_x11_legacy304 = nvidiaPackages.legacy_304;
nvidia_x11_legacy340 = nvidiaPackages.legacy_340; nvidia_x11_legacy340 = nvidiaPackages.legacy_340;
@ -15906,12 +15914,12 @@ in
source-han-code-jp = callPackage ../data/fonts/source-han-code-jp { }; source-han-code-jp = callPackage ../data/fonts/source-han-code-jp { };
sourceHanSansPackages = callPackage ../data/fonts/source-han-sans { }; sourceHanSansPackages = dontRecurseIntoAttrs (callPackage ../data/fonts/source-han-sans { });
source-han-sans-japanese = sourceHanSansPackages.japanese; source-han-sans-japanese = sourceHanSansPackages.japanese;
source-han-sans-korean = sourceHanSansPackages.korean; source-han-sans-korean = sourceHanSansPackages.korean;
source-han-sans-simplified-chinese = sourceHanSansPackages.simplified-chinese; source-han-sans-simplified-chinese = sourceHanSansPackages.simplified-chinese;
source-han-sans-traditional-chinese = sourceHanSansPackages.traditional-chinese; source-han-sans-traditional-chinese = sourceHanSansPackages.traditional-chinese;
sourceHanSerifPackages = callPackage ../data/fonts/source-han-serif { }; sourceHanSerifPackages = dontRecurseIntoAttrs (callPackage ../data/fonts/source-han-serif { });
source-han-serif-japanese = sourceHanSerifPackages.japanese; source-han-serif-japanese = sourceHanSerifPackages.japanese;
source-han-serif-korean = sourceHanSerifPackages.korean; source-han-serif-korean = sourceHanSerifPackages.korean;
source-han-serif-simplified-chinese = sourceHanSerifPackages.simplified-chinese; source-han-serif-simplified-chinese = sourceHanSerifPackages.simplified-chinese;
@ -16119,7 +16127,7 @@ in
gconf = gnome2.GConf; gconf = gnome2.GConf;
}; };
atomPackages = callPackage ../applications/editors/atom { }; atomPackages = dontRecurseIntoAttrs (callPackage ../applications/editors/atom { });
inherit (atomPackages) atom atom-beta; inherit (atomPackages) atom atom-beta;
@ -16896,8 +16904,8 @@ in
cask = callPackage ../applications/editors/emacs-modes/cask { }; cask = callPackage ../applications/editors/emacs-modes/cask { };
}; };
emacs25Packages = emacsPackagesFor emacs25 pkgs.emacs25Packages; emacs25Packages = dontRecurseIntoAttrs (emacsPackagesFor emacs25 pkgs.emacs25Packages);
emacs26Packages = emacsPackagesFor emacs26 pkgs.emacs26Packages; emacs26Packages = dontRecurseIntoAttrs (emacsPackagesFor emacs26 pkgs.emacs26Packages);
emacsPackagesNgFor = emacs: import ./emacs-packages.nix { emacsPackagesNgFor = emacs: import ./emacs-packages.nix {
inherit lib newScope stdenv; inherit lib newScope stdenv;
@ -16922,9 +16930,10 @@ in
}; };
}; };
emacs25PackagesNg = emacsPackagesNgFor emacs25; emacs25PackagesNg = dontRecurseIntoAttrs (emacsPackagesNgFor emacs25);
emacs26PackagesNg = dontRecurseIntoAttrs (emacsPackagesNgFor emacs26);
emacs25WithPackages = emacs25PackagesNg.emacsWithPackages; emacs25WithPackages = emacs25PackagesNg.emacsWithPackages;
emacs26PackagesNg = emacsPackagesNgFor emacs26;
emacs26WithPackages = emacs26PackagesNg.emacsWithPackages; emacs26WithPackages = emacs26PackagesNg.emacsWithPackages;
emacsWithPackages = emacsPackagesNg.emacsWithPackages; emacsWithPackages = emacsPackagesNg.emacsWithPackages;
@ -19555,7 +19564,7 @@ in
taskserver = callPackage ../servers/misc/taskserver { }; taskserver = callPackage ../servers/misc/taskserver { };
tdesktopPackages = callPackage ../applications/networking/instant-messengers/telegram/tdesktop { }; tdesktopPackages = dontRecurseIntoAttrs (callPackage ../applications/networking/instant-messengers/telegram/tdesktop { });
tdesktop = tdesktopPackages.stable; tdesktop = tdesktopPackages.stable;
telegram-cli = callPackage ../applications/networking/instant-messengers/telegram/telegram-cli { }; telegram-cli = callPackage ../applications/networking/instant-messengers/telegram/telegram-cli { };
@ -19972,7 +19981,7 @@ in
weechat = wrapWeechat weechat-unwrapped { }; weechat = wrapWeechat weechat-unwrapped { };
weechatScripts = callPackage ../applications/networking/irc/weechat/scripts { }; weechatScripts = dontRecurseIntoAttrs (callPackage ../applications/networking/irc/weechat/scripts { });
westonLite = weston.override { westonLite = weston.override {
pango = null; pango = null;
@ -21023,7 +21032,7 @@ in
stockfish = callPackage ../games/stockfish { }; stockfish = callPackage ../games/stockfish { };
steamPackages = callPackage ../games/steam { }; steamPackages = dontRecurseIntoAttrs (callPackage ../games/steam { });
steam = steamPackages.steam-chrootenv; steam = steamPackages.steam-chrootenv;
@ -21128,7 +21137,7 @@ in
ue4demos = recurseIntoAttrs (callPackage ../games/ue4demos { }); ue4demos = recurseIntoAttrs (callPackage ../games/ue4demos { });
ut2004Packages = callPackage ../games/ut2004 { }; ut2004Packages = dontRecurseIntoAttrs (callPackage ../games/ut2004 { });
ut2004demo = res.ut2004Packages.ut2004 [ res.ut2004Packages.ut2004-demo ]; ut2004demo = res.ut2004Packages.ut2004 [ res.ut2004Packages.ut2004-demo ];
@ -21237,9 +21246,9 @@ in
keen4 = callPackage ../games/keen4 { }; keen4 = callPackage ../games/keen4 { };
zeroadPackages = callPackage ../games/0ad { zeroadPackages = dontRecurseIntoAttrs (callPackage ../games/0ad {
wxGTK = wxGTK30; wxGTK = wxGTK30;
}; });
zeroad = zeroadPackages.zeroad; zeroad = zeroadPackages.zeroad;