summaryrefslogtreecommitdiffstats
path: root/pkgs/top-level/stage.nix
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-06-25 14:32:35 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2018-07-02 11:07:53 -0400
commitd1bd9faf6199096adc547ccd60ca850ef18324e4 (patch)
treec57e39b9f09ddca363d73f1268cd88ddbfdb057a /pkgs/top-level/stage.nix
parentb6b195059468d610309d70db99690111cc4a6714 (diff)
stage: move old stuff to stage.nix
Diffstat (limited to 'pkgs/top-level/stage.nix')
-rw-r--r--pkgs/top-level/stage.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix
index a9d1988ad5f4..551a4a6945be 100644
--- a/pkgs/top-level/stage.nix
+++ b/pkgs/top-level/stage.nix
@@ -117,6 +117,14 @@ let
lib.optionalAttrs allowCustomOverrides
((config.packageOverrides or (super: {})) super);
+ # Override system. This is useful to build i686 packages on x86_64-linux.
+ forceSystem = system: kernel: nixpkgsFun {
+ localSystem = {
+ inherit system;
+ platform = stdenv.hostPlatform.platform // { kernelArch = kernel; };
+ };
+ };
+
# Convenience attributes for instantitating nixpkgs. Each of these
# will instantiate a new version of allPackages. They map example
# attributes to their own thing.
@@ -127,6 +135,13 @@ let
pkgsLocal = lib.mapAttrs (n: localSystem:
nixpkgsFun { inherit localSystem; })
lib.systems.examples;
+
+ # Used by wine, firefox with debugging version of Flash, ...
+ pkgsi686Linux = forceSystem "i686-linux" "i386";
+
+ callPackage_i686 = if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"
+ then self.pkgsi686Linux.callPackage
+ else throw "callPackage_i686 not supported on system '${stdenv.system}'";
};
# The complete chain of package set builders, applied from top to bottom.