Merge pull request #42874 from obsidiansystems/crossPkgs
Add pkgsCross & pkgsLocal
This commit is contained in:
commit
ccfe1b5713
@ -5,7 +5,7 @@
|
||||
* to merges. Please use the full-text search of your editor. ;)
|
||||
* Hint: ### starts category names.
|
||||
*/
|
||||
{ lib, nixpkgsFun, noSysDirs, config}:
|
||||
{ lib, noSysDirs, config}:
|
||||
self: pkgs:
|
||||
|
||||
with pkgs;
|
||||
@ -15,22 +15,6 @@ 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.
|
||||
@ -2420,7 +2404,7 @@ with pkgs;
|
||||
fluentd = callPackage ../tools/misc/fluentd { };
|
||||
|
||||
flvstreamer = callPackage ../tools/networking/flvstreamer { };
|
||||
|
||||
|
||||
hmetis = callPackage_i686 ../applications/science/math/hmetis { };
|
||||
|
||||
libbsd = callPackage ../development/libraries/libbsd { };
|
||||
@ -5889,14 +5873,7 @@ with pkgs;
|
||||
xbursttools = callPackage ../tools/misc/xburst-tools {
|
||||
# It needs a cross compiler for mipsel to build the firmware it will
|
||||
# load into the Ben Nanonote
|
||||
gccCross =
|
||||
let
|
||||
pkgsCross = nixpkgsFun {
|
||||
# Ben Nanonote system
|
||||
crossSystem = lib.systems.examples.ben-nanonote;
|
||||
};
|
||||
in
|
||||
pkgsCross.buildPackages.gccCrossStageStatic;
|
||||
gccCross = pkgsCross.ben-nanonote.buildPackages.gccCrossStageStatic;
|
||||
};
|
||||
|
||||
xclip = callPackage ../tools/misc/xclip { };
|
||||
|
@ -93,7 +93,7 @@ let
|
||||
|
||||
allPackages = self: super:
|
||||
let res = import ./all-packages.nix
|
||||
{ inherit lib nixpkgsFun noSysDirs config; }
|
||||
{ inherit lib noSysDirs config; }
|
||||
res self;
|
||||
in res;
|
||||
|
||||
@ -117,6 +117,31 @@ 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.
|
||||
extraPkgs = self: super: {
|
||||
pkgsCross = lib.mapAttrs (n: crossSystem:
|
||||
nixpkgsFun { inherit crossSystem; })
|
||||
lib.systems.examples;
|
||||
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 = self.pkgsi686Linux.callPackage;
|
||||
inherit forceSystem;
|
||||
};
|
||||
|
||||
# The complete chain of package set builders, applied from top to bottom.
|
||||
# stdenvOverlays must be last as it brings package forward from the
|
||||
# previous bootstrapping phases which have already been overlayed.
|
||||
@ -127,6 +152,7 @@ let
|
||||
trivialBuilders
|
||||
splice
|
||||
allPackages
|
||||
extraPkgs
|
||||
aliases
|
||||
configOverrides
|
||||
] ++ overlays ++ [
|
||||
|
Loading…
Reference in New Issue
Block a user