stage: move old stuff to stage.nix

This commit is contained in:
Matthew Bauer 2018-06-25 14:32:35 -04:00
parent b6b1950594
commit d1bd9faf61
2 changed files with 15 additions and 17 deletions

View File

@ -12,25 +12,8 @@ with pkgs;
{
# Allow callPackage to fill in the pkgs argument
inherit pkgs;
# Override system. This is useful to build i686 packages on x86_64-linux.
forceSystem = system: kernel: nixpkgsFun {
localSystem = {
inherit system;
platform = platform // { kernelArch = kernel; };
};
};
# 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 pkgsi686Linux.callPackage
else throw "callPackage_i686 not supported on system '${stdenv.system}'";
# A stdenv capable of building 32-bit binaries. On x86_64-linux,
# it uses GCC compiled with multilib support; on i686-linux, it's
# just the plain stdenv.

View File

@ -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.