summary refs log tree commit diff
path: root/pkgs/top-level/stage.nix
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-07-05 15:47:10 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2018-07-05 15:47:10 -0400
commit69f1045001a32a45de891f3c2264d09b1955a7f2 (patch)
tree10e0b3a30313668c1a0ae6797d784f9a0b9475b5 /pkgs/top-level/stage.nix
parentc491a99362af31a53d9be6220e268d5b594bae29 (diff)
downloadnixpkgs-69f1045001a32a45de891f3c2264d09b1955a7f2.tar
nixpkgs-69f1045001a32a45de891f3c2264d09b1955a7f2.tar.gz
nixpkgs-69f1045001a32a45de891f3c2264d09b1955a7f2.tar.bz2
nixpkgs-69f1045001a32a45de891f3c2264d09b1955a7f2.tar.lz
nixpkgs-69f1045001a32a45de891f3c2264d09b1955a7f2.tar.xz
nixpkgs-69f1045001a32a45de891f3c2264d09b1955a7f2.tar.zst
nixpkgs-69f1045001a32a45de891f3c2264d09b1955a7f2.zip
treewide: remove forceSystem
Diffstat (limited to 'pkgs/top-level/stage.nix')
-rw-r--r--pkgs/top-level/stage.nix44
1 files changed, 19 insertions, 25 deletions
diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix
index 39dd00b66d5..20770bd6f32 100644
--- a/pkgs/top-level/stage.nix
+++ b/pkgs/top-level/stage.nix
@@ -124,31 +124,7 @@ let
   # - pkgsCross.<system> where system is a member of lib.systems.examples
   # - pkgsMusl
   # - pkgsi686Linux
-  #
-  # In addition some utility functions are included for creating the
-  # above sets.
-  #
-  # - forceLibc
-  # - forceSystem
-  otherPackageSets = self: super: {
-    # This maps each entry in lib.systems.examples to its own package
-    # set. Each of these will contain all packages cross compiled for
-    # that target system. For instance, pkgsCross.rasberryPi.hello,
-    # will refer to the "hello" package built for the ARM6-based
-    # Raspberry Pi.
-    pkgsCross = lib.mapAttrs (n: crossSystem:
-                              nixpkgsFun { inherit crossSystem; })
-                              lib.systems.examples;
-
-    # All packages built with the Musl libc. This will override the
-    # default GNU libc on Linux systems. Non-Linux systems are not
-    # supported.
-    pkgsMusl = self.forceLibc "musl";
-
-    # All packages built for i686 Linux.
-    # Used by wine, firefox with debugging version of Flash, ...
-    pkgsi686Linux = self.forceSystem "i686-linux" "i386";
-
+  otherPackageSets = self: super: let
     # Override default libc. Currently this is only useful on Linux
     # systems where you have the choice between Musl & Glibc. In the
     # future it may work for other things.
@@ -166,6 +142,24 @@ let
         platform = stdenv.hostPlatform.platform // { inherit kernelArch; };
       };
     };
+  in {
+    # This maps each entry in lib.systems.examples to its own package
+    # set. Each of these will contain all packages cross compiled for
+    # that target system. For instance, pkgsCross.rasberryPi.hello,
+    # will refer to the "hello" package built for the ARM6-based
+    # Raspberry Pi.
+    pkgsCross = lib.mapAttrs (n: crossSystem:
+                              nixpkgsFun { inherit crossSystem; })
+                              lib.systems.examples;
+
+    # All packages built with the Musl libc. This will override the
+    # default GNU libc on Linux systems. Non-Linux systems are not
+    # supported.
+    pkgsMusl = forceLibc "musl";
+
+    # All packages built for i686 Linux.
+    # Used by wine, firefox with debugging version of Flash, ...
+    pkgsi686Linux = forceSystem "i686-linux" "i386";
   };
 
   # The complete chain of package set builders, applied from top to bottom.