diff --git a/default.nix b/default.nix index bdbe13b3ea245..5465f12f16075 100644 --- a/default.nix +++ b/default.nix @@ -4,4 +4,4 @@ if ! builtins ? nixVersion || builtins.compareVersions "1.8" builtins.nixVersion else - import ./pkgs/top-level/all-packages.nix + import ./pkgs/top-level/all-packages-wrapper.nix diff --git a/lib/strings-with-deps.nix b/lib/strings-with-deps.nix index bdcc25cbd20cc..a901940ac12b0 100644 --- a/lib/strings-with-deps.nix +++ b/lib/strings-with-deps.nix @@ -15,7 +15,7 @@ Usage: Attention: let - pkgs = (import /etc/nixos/nixpkgs/pkgs/top-level/all-packages.nix) {}; + pkgs = (import ) {}; in let inherit (pkgs.stringsWithDeps) fullDepEntry packEntry noDepEntry textClosureMap; inherit (pkgs.lib) id; diff --git a/pkgs/build-support/vm/windows/cygwin-iso/default.nix b/pkgs/build-support/vm/windows/cygwin-iso/default.nix index b560a850a3067..79a933cf77196 100644 --- a/pkgs/build-support/vm/windows/cygwin-iso/default.nix +++ b/pkgs/build-support/vm/windows/cygwin-iso/default.nix @@ -16,7 +16,7 @@ let sha256 = "1slyj4qha7x649ggwdski9spmyrbs04z2d46vgk8krllg0kppnjv"; }; - cygwinCross = (import ../../../../top-level/all-packages.nix { + cygwinCross = (import ../../../../top-level/all-packages-wrapper.nix { inherit (stdenv) system; crossSystem = { libc = "msvcrt"; diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 9ad2c8504d1aa..a1cdd0906788b 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -1,11 +1,11 @@ { system ? builtins.currentSystem -, allPackages ? import ../../top-level/all-packages.nix +, allPackages ? import ../../top-level/all-packages-wrapper.nix , platform ? null , config ? {} }: rec { - allPackages = import ../../top-level/all-packages.nix; + allPackages = import ../../top-level/all-packages-wrapper.nix; bootstrapTools = derivation { inherit system; diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix index 636410fdd788c..3af15cf6d1471 100644 --- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix @@ -1,6 +1,6 @@ {system ? builtins.currentSystem}: -with import ../../top-level/all-packages.nix {inherit system;}; +with import ../../top-level/all-packages-wrapper.nix {inherit system;}; rec { # We want coreutils without ACL support. diff --git a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix index bf060329be6d5..8ba0d49d5e1c6 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix @@ -3,9 +3,9 @@ let buildFor = toolsArch: ( let - pkgsFun = import ../../top-level/all-packages.nix; + pkgsFun = import ../../top-level/all-packages-wrapper.nix; pkgsNoParams = pkgsFun {}; - + sheevaplugCrossSystem = { crossSystem = rec { config = "armv5tel-unknown-linux-gnueabi"; diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index a995606886f3d..d3539cc8cd87a 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -1,6 +1,6 @@ { system ? builtins.currentSystem }: -with import ../../top-level/all-packages.nix {inherit system;}; +with import ../../top-level/all-packages-wrapper.nix {inherit system;}; rec { diff --git a/pkgs/stdenv/pure-darwin/default.nix b/pkgs/stdenv/pure-darwin/default.nix index 1d194f90d9b81..1018509b510d9 100644 --- a/pkgs/stdenv/pure-darwin/default.nix +++ b/pkgs/stdenv/pure-darwin/default.nix @@ -1,5 +1,5 @@ { system ? builtins.currentSystem -, allPackages ? import ../../top-level/all-packages.nix +, allPackages ? import ../../top-level/all-packages-wrapper.nix , platform ? null , config ? {} }: @@ -34,7 +34,7 @@ let }; tarball = fetch { file = "bootstrap-tools.9.cpio.bz2"; sha256 = "1xim0wm4ld45ysdmgpsa6b1f6srdnfj054ilv86k0pa5plvcmsf4"; }; in rec { - allPackages = import ../../top-level/all-packages.nix; + allPackages = import ../../top-level/all-packages-wrapper.nix; commonPreHook = '' export NIX_ENFORCE_PURITY=1 diff --git a/pkgs/stdenv/pure-darwin/make-bootstrap-tools.nix b/pkgs/stdenv/pure-darwin/make-bootstrap-tools.nix index 433638dd1bdeb..c8fe119e73dce 100644 --- a/pkgs/stdenv/pure-darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/pure-darwin/make-bootstrap-tools.nix @@ -1,6 +1,6 @@ {system ? builtins.currentSystem}: -with import ../../top-level/all-packages.nix {inherit system;}; +with import ../../top-level/all-packages-wrapper.nix {inherit system;}; rec { # We want coreutils without ACL support. diff --git a/pkgs/test/mkOption/keep.nix b/pkgs/test/mkOption/keep.nix index c26064d89f7e2..d1b5f10b2effe 100644 --- a/pkgs/test/mkOption/keep.nix +++ b/pkgs/test/mkOption/keep.nix @@ -1,5 +1,5 @@ let - pkgs = import ../../top-level/all-packages.nix {}; + pkgs = import ../../top-level/all-packages-wrapper.nix {}; config = import ./declare.nix; in with (pkgs.lib); diff --git a/pkgs/test/mkOption/merge.nix b/pkgs/test/mkOption/merge.nix index 0d4b3c1acd18c..3a4ca97d3167f 100644 --- a/pkgs/test/mkOption/merge.nix +++ b/pkgs/test/mkOption/merge.nix @@ -1,5 +1,5 @@ let - pkgs = import ../../top-level/all-packages.nix {}; + pkgs = import ../../top-level/all-packages-wrapper.nix {}; config = import ./declare.nix; # Define the handler of unbound options. diff --git a/pkgs/top-level/all-packages-aliases.nix b/pkgs/top-level/all-packages-aliases.nix new file mode 100644 index 0000000000000..304a109b890c3 --- /dev/null +++ b/pkgs/top-level/all-packages-aliases.nix @@ -0,0 +1,44 @@ +pkgs: with pkgs; + + ### Deprecated aliases - for backward compatibility + +rec { + adobeReader = adobe-reader; + arduino_core = arduino-core; # added 2015-02-04 + asciidocFull = asciidoc-full; # added 2014-06-22 + bridge_utils = bridge-utils; # added 2015-02-20 + buildbotSlave = buildbot-slave; # added 2014-12-09 + cheetahTemplate = pythonPackages.cheetah; # 2015-06-15 + clangAnalyzer = clang-analyzer; # added 2015-02-20 + cool-old-term = cool-retro-term; # added 2015-01-31 + cv = progress; # added 2015-09-06 + enblendenfuse = enblend-enfuse; # 2015-09-30 + exfat-utils = exfat; # 2015-09-11 + firefoxWrapper = firefox-wrapper; + fuse_exfat = exfat; # 2015-09-11 + haskell-ng = haskell; # 2015-04-19 + haskellngPackages = haskellPackages; # 2015-04-19 + htmlTidy = html-tidy; # added 2014-12-06 + inherit (haskell.compiler) jhc uhc; # 2015-05-15 + inotifyTools = inotify-tools; + jquery_ui = jquery-ui; # added 2014-09-07 + libtidy = html-tidy; # added 2014-12-21 + lttngTools = lttng-tools; # added 2014-07-31 + lttngUst = lttng-ust; # added 2014-07-31 + nfsUtils = nfs-utils; # added 2014-12-06 + quassel_qt5 = kf5Packages.quassel_qt5; # added 2015-09-30 + quasselClient_qt5 = kf5Packages.quasselClient_qt5; # added 2015-09-30 + quasselDaemon_qt5 = kf5Packages.quasselDaemon; # added 2015-09-30 + quassel_kf5 = kf5Packages.quassel; # added 2015-09-30 + quasselClient_kf5 = kf5Packages.quasselClient; # added 2015-09-30 + rdiff_backup = rdiff-backup; # added 2014-11-23 + rssglx = rss-glx; #added 2015-03-25 + rxvt_unicode_with-plugins = rxvt_unicode-with-plugins; # added 2015-04-02 + speedtest_cli = speedtest-cli; # added 2015-02-17 + sqliteInteractive = sqlite-interactive; # added 2014-12-06 + x11 = xlibsWrapper; # added 2015-09 + xf86_video_nouveau = xorg.xf86videonouveau; # added 2015-09 + xlibs = xorg; # added 2015-09 + youtube-dl = pythonPackages.youtube-dl; # added 2015-06-07 + youtubeDL = youtube-dl; # added 2014-10-26 +} diff --git a/pkgs/top-level/all-packages-wrapper.nix b/pkgs/top-level/all-packages-wrapper.nix new file mode 100644 index 0000000000000..a991a42946322 --- /dev/null +++ b/pkgs/top-level/all-packages-wrapper.nix @@ -0,0 +1,134 @@ +/* This file composes the Nix Packages collection. That is, it + imports the functions that build the various packages, and calls + them with appropriate arguments. The result is a set of all the + packages in the Nix Packages collection for some particular + platform. */ + + +{ # The system (e.g., `i686-linux') for which to build the packages. + system ? builtins.currentSystem + +, # The standard environment to use. Only used for bootstrapping. If + # null, the default standard environment is used. + bootStdenv ? null + +, # Non-GNU/Linux OSes are currently "impure" platforms, with their libc + # outside of the store. Thus, GCC, GFortran, & co. must always look for + # files in standard system directories (/usr/include, etc.) + noSysDirs ? (system != "x86_64-freebsd" && system != "i686-freebsd" + && system != "x86_64-kfreebsd-gnu") + + # More flags for the bootstrapping of stdenv. +, gccWithCC ? true +, gccWithProfiling ? true + +, # Allow a configuration attribute set to be passed in as an + # argument. Otherwise, it's read from $NIXPKGS_CONFIG or + # ~/.nixpkgs/config.nix. + config ? null + +, crossSystem ? null +, platform ? null +}: + + +let config_ = config; platform_ = platform; in # rename the function arguments + +let + + lib = import ../../lib; + + # The contents of the configuration file found at $NIXPKGS_CONFIG or + # $HOME/.nixpkgs/config.nix. + # for NIXOS (nixos-rebuild): use nixpkgs.config option + config = + let + toPath = builtins.toPath; + getEnv = x: if builtins ? getEnv then builtins.getEnv x else ""; + pathExists = name: + builtins ? pathExists && builtins.pathExists (toPath name); + + configFile = getEnv "NIXPKGS_CONFIG"; + homeDir = getEnv "HOME"; + configFile2 = homeDir + "/.nixpkgs/config.nix"; + + configExpr = + if config_ != null then config_ + else if configFile != "" && pathExists configFile then import (toPath configFile) + else if homeDir != "" && pathExists configFile2 then import (toPath configFile2) + else {}; + + in + # allow both: + # { /* the config */ } and + # { pkgs, ... } : { /* the config */ } + if builtins.isFunction configExpr + then configExpr { inherit pkgs; } + else configExpr; + + # Allow setting the platform in the config file. Otherwise, let's use a reasonable default (pc) + + platformAuto = let + platforms = (import ./platforms.nix); + in + if system == "armv6l-linux" then platforms.raspberrypi + else if system == "armv7l-linux" then platforms.armv7l-hf-multiplatform + else if system == "armv5tel-linux" then platforms.sheevaplug + else if system == "mips64el-linux" then platforms.fuloong2f_n32 + else if system == "x86_64-linux" then platforms.pc64 + else if system == "i686-linux" then platforms.pc32 + else platforms.pcBase; + + platform = if platform_ != null then platform_ + else config.platform or platformAuto; + + # Allow packages to be overriden globally via the `packageOverrides' + # configuration option, which must be a function that takes `pkgs' + # as an argument and returns a set of new or overriden packages. + # The `packageOverrides' function is called with the *original* + # (un-overriden) set of packages, allowing packageOverrides + # attributes to refer to the original attributes (e.g. "foo = + # ... pkgs.foo ..."). + pkgs = applyGlobalOverrides (config.packageOverrides or (pkgs: {})); + + mkOverrides = pkgsOrig: overrides: overrides // + (lib.optionalAttrs (pkgsOrig.stdenv ? overrides && crossSystem == null) (pkgsOrig.stdenv.overrides pkgsOrig)); + + # Return the complete set of packages, after applying the overrides + # returned by the `overrider' function (see above). Warning: this + # function is very expensive! + applyGlobalOverrides = overrider: + let + # Call the overrider function. We don't want stdenv overrides + # in the case of cross-building, or otherwise the basic + # overrided packages will not be built with the crossStdenv + # adapter. + overrides = mkOverrides pkgsOrig (overrider pkgsOrig); + + # The un-overriden packages, passed to `overrider'. + pkgsOrig = pkgsFun pkgs {}; + + # The overriden, final packages. + pkgs = pkgsFun pkgs overrides; + in pkgs; + + # The package compositions. + pkgsFun = pkgs: overrides: + let + self = self_ // overrides; + self_ = import ./all-packages.nix { + inherit self pkgs; + inherit system crossSystem platform bootStdenv noSysDirs gccWithCC + gccWithProfiling config; + }; + + aliases = import ./all-packages-aliases.nix self; + + tweakAlias = _n: alias: with lib; + if alias.recurseForDerivations or false then + removeAttrs alias ["recurseForDerivations"] + else alias; + + in lib.mapAttrs tweakAlias aliases // self; + +in pkgs diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ea926a80dac4b..dd7c3af2018d1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1,87 +1,43 @@ -/* This file composes the Nix Packages collection. That is, it - imports the functions that build the various packages, and calls - them with appropriate arguments. The result is a set of all the - packages in the Nix Packages collection for some particular - platform. */ +{ # Self-reference which is mutated by the user configuration, and from + # which all dependencies are infered. This self-reference is similar to + # the `rec` keyword with overwritten packages. + self +, # Another self-reference which is used to build the original set of + # packages with the overwritten dependencies. + pkgs -{ # The system (e.g., `i686-linux') for which to build the packages. - system ? builtins.currentSystem +, # The system (e.g., `i686-linux') for which to build the packages. + system +, crossSystem +, platform , # The standard environment to use. Only used for bootstrapping. If # null, the default standard environment is used. - bootStdenv ? null + bootStdenv , # Non-GNU/Linux OSes are currently "impure" platforms, with their libc # outside of the store. Thus, GCC, GFortran, & co. must always look for # files in standard system directories (/usr/include, etc.) - noSysDirs ? (system != "x86_64-freebsd" && system != "i686-freebsd" - && system != "x86_64-kfreebsd-gnu") + noSysDirs # More flags for the bootstrapping of stdenv. -, gccWithCC ? true -, gccWithProfiling ? true +, gccWithCC +, gccWithProfiling , # Allow a configuration attribute set to be passed in as an # argument. Otherwise, it's read from $NIXPKGS_CONFIG or # ~/.nixpkgs/config.nix. - config ? null + config -, crossSystem ? null -, platform ? null +, # These are used by overridePackages + mkOverrides +, pkgsFun }: - -let config_ = config; platform_ = platform; in # rename the function arguments - let - lib = import ../../lib; - # The contents of the configuration file found at $NIXPKGS_CONFIG or - # $HOME/.nixpkgs/config.nix. - # for NIXOS (nixos-rebuild): use nixpkgs.config option - config = - let - toPath = builtins.toPath; - getEnv = x: if builtins ? getEnv then builtins.getEnv x else ""; - pathExists = name: - builtins ? pathExists && builtins.pathExists (toPath name); - - configFile = getEnv "NIXPKGS_CONFIG"; - homeDir = getEnv "HOME"; - configFile2 = homeDir + "/.nixpkgs/config.nix"; - - configExpr = - if config_ != null then config_ - else if configFile != "" && pathExists configFile then import (toPath configFile) - else if homeDir != "" && pathExists configFile2 then import (toPath configFile2) - else {}; - - in - # allow both: - # { /* the config */ } and - # { pkgs, ... } : { /* the config */ } - if builtins.isFunction configExpr - then configExpr { inherit pkgs; } - else configExpr; - - # Allow setting the platform in the config file. Otherwise, let's use a reasonable default (pc) - - platformAuto = let - platforms = (import ./platforms.nix); - in - if system == "armv6l-linux" then platforms.raspberrypi - else if system == "armv7l-linux" then platforms.armv7l-hf-multiplatform - else if system == "armv5tel-linux" then platforms.sheevaplug - else if system == "mips64el-linux" then platforms.fuloong2f_n32 - else if system == "x86_64-linux" then platforms.pc64 - else if system == "i686-linux" then platforms.pc32 - else platforms.pcBase; - - platform = if platform_ != null then platform_ - else config.platform or platformAuto; - # Helper functions that are exported through `pkgs'. helperFunctions = stdenvAdapters // @@ -90,43 +46,15 @@ let stdenvAdapters = import ../stdenv/adapters.nix pkgs; + # Default scope of packages used by callPackages to fill the named + # arguments of the functions which are imported by each package + # expression. + defaultScope = pkgs // pkgs.xorg; +in - # Allow packages to be overriden globally via the `packageOverrides' - # configuration option, which must be a function that takes `pkgs' - # as an argument and returns a set of new or overriden packages. - # The `packageOverrides' function is called with the *original* - # (un-overriden) set of packages, allowing packageOverrides - # attributes to refer to the original attributes (e.g. "foo = - # ... pkgs.foo ..."). - pkgs = applyGlobalOverrides (config.packageOverrides or (pkgs: {})); - - mkOverrides = pkgsOrig: overrides: overrides // - (lib.optionalAttrs (pkgsOrig.stdenv ? overrides && crossSystem == null) (pkgsOrig.stdenv.overrides pkgsOrig)); - - # Return the complete set of packages, after applying the overrides - # returned by the `overrider' function (see above). Warning: this - # function is very expensive! - applyGlobalOverrides = overrider: - let - # Call the overrider function. We don't want stdenv overrides - # in the case of cross-building, or otherwise the basic - # overrided packages will not be built with the crossStdenv - # adapter. - overrides = mkOverrides pkgsOrig (overrider pkgsOrig); - - # The un-overriden packages, passed to `overrider'. - pkgsOrig = pkgsFun pkgs {}; - - # The overriden, final packages. - pkgs = pkgsFun pkgs overrides; - in pkgs; +with self; - - # The package compositions. Yes, this isn't properly indented. - pkgsFun = pkgs: overrides: - with helperFunctions; - let defaultScope = pkgs // pkgs.xorg; self = self_ // overrides; - self_ = with self; helperFunctions // { +helperFunctions // { # Make some arguments passed to all-packages.nix available inherit system platform; @@ -163,7 +91,7 @@ let in newpkgs; # Override system. This is useful to build i686 packages on x86_64-linux. - forceSystem = system: kernel: (import ./all-packages.nix) { + forceSystem = system: kernel: (import ./all-packages-wrapper.nix) { inherit system; platform = platform // { kernelArch = kernel; }; inherit bootStdenv noSysDirs gccWithCC gccWithProfiling config @@ -211,7 +139,7 @@ let allStdenvs = import ../stdenv { inherit system platform config lib; - allPackages = args: import ./all-packages.nix ({ inherit config system; } // args); + allPackages = args: import ./all-packages-wrapper.nix ({ inherit config system; } // args); }; defaultStdenv = allStdenvs.stdenv // { inherit platform; }; @@ -228,7 +156,7 @@ let in if changer != null then changer { # We import again all-packages to avoid recursivities. - pkgs = import ./all-packages.nix { + pkgs = import ./all-packages-wrapper.nix { # We remove packageOverrides to avoid recursivities config = removeAttrs config [ "replaceStdenv" ]; }; @@ -3500,7 +3428,7 @@ let # load into the Ben Nanonote gccCross = let - pkgsCross = (import ./all-packages.nix) { + pkgsCross = (import ./all-packages-wrapper.nix) { inherit system; inherit bootStdenv noSysDirs gccWithCC gccWithProfiling config; # Ben Nanonote system @@ -15134,56 +15062,4 @@ let mg = callPackage ../applications/editors/mg { }; -}; # self_ = - - - ### Deprecated aliases - for backward compatibility - -aliases = with self; rec { - adobeReader = adobe-reader; - arduino_core = arduino-core; # added 2015-02-04 - asciidocFull = asciidoc-full; # added 2014-06-22 - bridge_utils = bridge-utils; # added 2015-02-20 - buildbotSlave = buildbot-slave; # added 2014-12-09 - cheetahTemplate = pythonPackages.cheetah; # 2015-06-15 - clangAnalyzer = clang-analyzer; # added 2015-02-20 - cool-old-term = cool-retro-term; # added 2015-01-31 - cv = progress; # added 2015-09-06 - enblendenfuse = enblend-enfuse; # 2015-09-30 - exfat-utils = exfat; # 2015-09-11 - firefoxWrapper = firefox-wrapper; - fuse_exfat = exfat; # 2015-09-11 - haskell-ng = haskell; # 2015-04-19 - haskellngPackages = haskellPackages; # 2015-04-19 - htmlTidy = html-tidy; # added 2014-12-06 - inherit (haskell.compiler) jhc uhc; # 2015-05-15 - inotifyTools = inotify-tools; - jquery_ui = jquery-ui; # added 2014-09-07 - libtidy = html-tidy; # added 2014-12-21 - lttngTools = lttng-tools; # added 2014-07-31 - lttngUst = lttng-ust; # added 2014-07-31 - nfsUtils = nfs-utils; # added 2014-12-06 - quassel_qt5 = kf5Packages.quassel_qt5; # added 2015-09-30 - quasselClient_qt5 = kf5Packages.quasselClient_qt5; # added 2015-09-30 - quasselDaemon_qt5 = kf5Packages.quasselDaemon; # added 2015-09-30 - quassel_kf5 = kf5Packages.quassel; # added 2015-09-30 - quasselClient_kf5 = kf5Packages.quasselClient; # added 2015-09-30 - rdiff_backup = rdiff-backup; # added 2014-11-23 - rssglx = rss-glx; #added 2015-03-25 - rxvt_unicode_with-plugins = rxvt_unicode-with-plugins; # added 2015-04-02 - speedtest_cli = speedtest-cli; # added 2015-02-17 - sqliteInteractive = sqlite-interactive; # added 2014-12-06 - x11 = xlibsWrapper; # added 2015-09 - xf86_video_nouveau = xorg.xf86videonouveau; # added 2015-09 - xlibs = xorg; # added 2015-09 - youtube-dl = pythonPackages.youtube-dl; # added 2015-06-07 - youtubeDL = youtube-dl; # added 2014-10-26 -}; - -tweakAlias = _n: alias: with lib; - if alias.recurseForDerivations or false then - removeAttrs alias ["recurseForDerivations"] - else alias; - -in lib.mapAttrs tweakAlias aliases // self; in pkgs - +} diff --git a/pkgs/top-level/guile-2-test.nix b/pkgs/top-level/guile-2-test.nix index 802277d474a10..6a833457876c5 100644 --- a/pkgs/top-level/guile-2-test.nix +++ b/pkgs/top-level/guile-2-test.nix @@ -4,7 +4,7 @@ -- ludo@gnu.org */ let - allPackages = import ./all-packages.nix; + allPackages = import ./all-packages-wrapper.nix; pkgsFun = { system ? builtins.currentSystem }: allPackages { diff --git a/pkgs/top-level/make-tarball.nix b/pkgs/top-level/make-tarball.nix index cc6e871033506..63d50fa5df9d1 100644 --- a/pkgs/top-level/make-tarball.nix +++ b/pkgs/top-level/make-tarball.nix @@ -35,8 +35,8 @@ releaseTools.sourceTarball rec { # Make sure that derivation paths do not depend on the Nixpkgs path. mkdir $TMPDIR/foo ln -s $(readlink -f .) $TMPDIR/foo/bar - p1=$(nix-instantiate pkgs/top-level/all-packages.nix --dry-run -A firefox) - p2=$(nix-instantiate $TMPDIR/foo/bar/pkgs/top-level/all-packages.nix --dry-run -A firefox) + p1=$(nix-instantiate pkgs/top-level/all-packages-wrapper.nix --dry-run -A firefox) + p2=$(nix-instantiate $TMPDIR/foo/bar/pkgs/top-level/all-packages-wrapper.nix --dry-run -A firefox) if [ "$p1" != "$p2" ]; then echo "Nixpkgs evaluation depends on Nixpkgs path ($p1 vs $p2)!" exit 1 @@ -49,13 +49,13 @@ releaseTools.sourceTarball rec { exit 1 fi - # Check that all-packages.nix evaluates on a number of platforms. + # Check that all-packages-wrapper.nix evaluates on a number of platforms. for platform in i686-linux x86_64-linux x86_64-darwin; do - header "checking pkgs/top-level/all-packages.nix on $platform" - NIXPKGS_ALLOW_BROKEN=1 nix-env -f pkgs/top-level/all-packages.nix \ + header "checking pkgs/top-level/all-packages-wrapper.nix on $platform" + NIXPKGS_ALLOW_BROKEN=1 nix-env -f pkgs/top-level/all-packages-wrapper.nix \ --show-trace --argstr system "$platform" \ -qa --drv-path --system-filter \* --system > /dev/null - NIXPKGS_ALLOW_BROKEN=1 nix-env -f pkgs/top-level/all-packages.nix \ + NIXPKGS_ALLOW_BROKEN=1 nix-env -f pkgs/top-level/all-packages-wrapper.nix \ --show-trace --argstr system "$platform" \ -qa --drv-path --system-filter \* --system --meta --xml > /dev/null stopNest diff --git a/pkgs/top-level/release-lib.nix b/pkgs/top-level/release-lib.nix index 15380ea43c8e5..2f102c5a5effa 100644 --- a/pkgs/top-level/release-lib.nix +++ b/pkgs/top-level/release-lib.nix @@ -1,4 +1,4 @@ -{ supportedSystems, packageSet ? (import ./all-packages.nix), allowTexliveBuilds ? false }: +{ supportedSystems, packageSet ? (import ./all-packages-wrapper.nix), allowTexliveBuilds ? false }: with import ../../lib; diff --git a/pkgs/top-level/release-python.nix b/pkgs/top-level/release-python.nix index a7d3194cdbb6d..e444217aa8304 100644 --- a/pkgs/top-level/release-python.nix +++ b/pkgs/top-level/release-python.nix @@ -3,7 +3,7 @@ $ nix-build pkgs/top-level/release-python.nix */ -{ nixpkgs ? { outPath = (import ./all-packages.nix {}).lib.cleanSource ../..; revCount = 1234; shortRev = "abcdef"; } +{ nixpkgs ? { outPath = (import ../../lib).cleanSource ../..; revCount = 1234; shortRev = "abcdef"; } , officialRelease ? false , # The platforms for which we build Nixpkgs. supportedSystems ? [ "x86_64-linux" "i686-linux" "x86_64-darwin" "x86_64-freebsd" "i686-freebsd" ] diff --git a/pkgs/top-level/release-small.nix b/pkgs/top-level/release-small.nix index 4978c2e41b037..85b115fd59c79 100644 --- a/pkgs/top-level/release-small.nix +++ b/pkgs/top-level/release-small.nix @@ -1,7 +1,7 @@ /* A small release file, with few packages to be built. The aim is to reduce the load on Hydra when testing the `stdenv-updates' branch. */ -{ nixpkgs ? { outPath = (import ./all-packages.nix {}).lib.cleanSource ../..; revCount = 1234; shortRev = "abcdef"; } +{ nixpkgs ? { outPath = (import ../../lib).cleanSource ../..; revCount = 1234; shortRev = "abcdef"; } , supportedSystems ? [ "x86_64-linux" "i686-linux" "x86_64-darwin" ] }: diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index cb09a69136e2f..1b4bd80b416e0 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -9,7 +9,7 @@ $ nix-build pkgs/top-level/release.nix -A coreutils.x86_64-linux */ -{ nixpkgs ? { outPath = (import ./all-packages.nix {}).lib.cleanSource ../..; revCount = 1234; shortRev = "abcdef"; } +{ nixpkgs ? { outPath = (import ../../lib).cleanSource ../..; revCount = 1234; shortRev = "abcdef"; } , officialRelease ? false , # The platforms for which we build Nixpkgs. supportedSystems ? [ "x86_64-linux" "i686-linux" "x86_64-darwin" ]