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. ;)
|
* to merges. Please use the full-text search of your editor. ;)
|
||||||
* Hint: ### starts category names.
|
* Hint: ### starts category names.
|
||||||
*/
|
*/
|
||||||
{ lib, nixpkgsFun, noSysDirs, config}:
|
{ lib, noSysDirs, config}:
|
||||||
self: pkgs:
|
self: pkgs:
|
||||||
|
|
||||||
with pkgs;
|
with pkgs;
|
||||||
@ -15,22 +15,6 @@ with pkgs;
|
|||||||
# Allow callPackage to fill in the pkgs argument
|
# Allow callPackage to fill in the pkgs argument
|
||||||
inherit pkgs;
|
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,
|
# A stdenv capable of building 32-bit binaries. On x86_64-linux,
|
||||||
# it uses GCC compiled with multilib support; on i686-linux, it's
|
# it uses GCC compiled with multilib support; on i686-linux, it's
|
||||||
# just the plain stdenv.
|
# just the plain stdenv.
|
||||||
@ -5889,14 +5873,7 @@ with pkgs;
|
|||||||
xbursttools = callPackage ../tools/misc/xburst-tools {
|
xbursttools = callPackage ../tools/misc/xburst-tools {
|
||||||
# It needs a cross compiler for mipsel to build the firmware it will
|
# It needs a cross compiler for mipsel to build the firmware it will
|
||||||
# load into the Ben Nanonote
|
# load into the Ben Nanonote
|
||||||
gccCross =
|
gccCross = pkgsCross.ben-nanonote.buildPackages.gccCrossStageStatic;
|
||||||
let
|
|
||||||
pkgsCross = nixpkgsFun {
|
|
||||||
# Ben Nanonote system
|
|
||||||
crossSystem = lib.systems.examples.ben-nanonote;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
pkgsCross.buildPackages.gccCrossStageStatic;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
xclip = callPackage ../tools/misc/xclip { };
|
xclip = callPackage ../tools/misc/xclip { };
|
||||||
|
@ -93,7 +93,7 @@ let
|
|||||||
|
|
||||||
allPackages = self: super:
|
allPackages = self: super:
|
||||||
let res = import ./all-packages.nix
|
let res = import ./all-packages.nix
|
||||||
{ inherit lib nixpkgsFun noSysDirs config; }
|
{ inherit lib noSysDirs config; }
|
||||||
res self;
|
res self;
|
||||||
in res;
|
in res;
|
||||||
|
|
||||||
@ -117,6 +117,31 @@ let
|
|||||||
lib.optionalAttrs allowCustomOverrides
|
lib.optionalAttrs allowCustomOverrides
|
||||||
((config.packageOverrides or (super: {})) super);
|
((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.
|
# The complete chain of package set builders, applied from top to bottom.
|
||||||
# stdenvOverlays must be last as it brings package forward from the
|
# stdenvOverlays must be last as it brings package forward from the
|
||||||
# previous bootstrapping phases which have already been overlayed.
|
# previous bootstrapping phases which have already been overlayed.
|
||||||
@ -127,6 +152,7 @@ let
|
|||||||
trivialBuilders
|
trivialBuilders
|
||||||
splice
|
splice
|
||||||
allPackages
|
allPackages
|
||||||
|
extraPkgs
|
||||||
aliases
|
aliases
|
||||||
configOverrides
|
configOverrides
|
||||||
] ++ overlays ++ [
|
] ++ overlays ++ [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user