git.iko.soy/typeable/nixpkgs
on master help sign in
stage: move old stuff to stage.nix
commitd1bd9faf6199096adc547ccd60ca850ef18324e4 authorMatthew Bauer <mjbauer95@gmail.com> dateMon 25 Jun 2018, 14:32 (8 years ago) parentb6b1950
2 files changed+15−17
pkgs/top-level/all-packages.nix−17 pkgs/top-level/stage.nix+15
pkgs/top-level/all-packages.nix−17
@@ -12,25 +12,8 @@ with pkgs;
1212
1313{
1414
15− # Allow callPackage to fill in the pkgs argument
1615 inherit pkgs;
1716
18−
19− # Override system. This is useful to build i686 packages on x86_64-linux.
20− forceSystem = system: kernel: nixpkgsFun {
21− localSystem = {
22− inherit system;
23− platform = platform // { kernelArch = kernel; };
24− };
25− };
26−
27− # Used by wine, firefox with debugging version of Flash, ...
28− pkgsi686Linux = forceSystem "i686-linux" "i386";
29−
30− callPackage_i686 = if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"
31− then pkgsi686Linux.callPackage
32− else throw "callPackage_i686 not supported on system '${stdenv.system}'";
33−
3417 # A stdenv capable of building 32-bit binaries. On x86_64-linux,
3518 # it uses GCC compiled with multilib support; on i686-linux, it's
3619 # just the plain stdenv.
pkgs/top-level/stage.nix+15
@@ -117,6 +117,14 @@ let
117117 lib.optionalAttrs allowCustomOverrides
118118 ((config.packageOverrides or (super: {})) super);
119119
120+ # Override system. This is useful to build i686 packages on x86_64-linux.
121+ forceSystem = system: kernel: nixpkgsFun {
122+ localSystem = {
123+ inherit system;
124+ platform = stdenv.hostPlatform.platform // { kernelArch = kernel; };
125+ };
126+ };
127+
120128 # Convenience attributes for instantitating nixpkgs. Each of these
121129 # will instantiate a new version of allPackages. They map example
122130 # attributes to their own thing.
@@ -127,6 +135,13 @@ let
127135 pkgsLocal = lib.mapAttrs (n: localSystem:
128136 nixpkgsFun { inherit localSystem; })
129137 lib.systems.examples;
138+
139+ # Used by wine, firefox with debugging version of Flash, ...
140+ pkgsi686Linux = forceSystem "i686-linux" "i386";
141+
142+ callPackage_i686 = if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"
143+ then self.pkgsi686Linux.callPackage
144+ else throw "callPackage_i686 not supported on system '${stdenv.system}'";
130145 };
131146
132147 # The complete chain of package set builders, applied from top to bottom.