mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
stage: Make pkgsMusl
and pkgsi686linux
respect the original localSystem more
For example: nix-repl> pkgsi686Linux.pkgsMusl.hostPlatform.config "i686-unknown-linux-musl" nix-repl> pkgsMusl.pkgsi686Linux.hostPlatform.config "i686-unknown-linux-musl"
This commit is contained in:
parent
69f1045001
commit
f795ed79d0
|
@ -124,25 +124,7 @@ let
|
||||||
# - pkgsCross.<system> where system is a member of lib.systems.examples
|
# - pkgsCross.<system> where system is a member of lib.systems.examples
|
||||||
# - pkgsMusl
|
# - pkgsMusl
|
||||||
# - pkgsi686Linux
|
# - pkgsi686Linux
|
||||||
otherPackageSets = self: super: let
|
otherPackageSets = self: super: {
|
||||||
# Override default libc. Currently this is only useful on Linux
|
|
||||||
# systems where you have the choice between Musl & Glibc. In the
|
|
||||||
# future it may work for other things.
|
|
||||||
forceLibc = libc: nixpkgsFun {
|
|
||||||
localSystem = stdenv.hostPlatform // { inherit libc; };
|
|
||||||
};
|
|
||||||
|
|
||||||
# Override the system while preserving platform configuration.
|
|
||||||
# system refers to the system tuple. kernelArch refers to the
|
|
||||||
# kernel architecture used (only recognized by Linux kernels,
|
|
||||||
# currently).
|
|
||||||
forceSystem = system: kernelArch: nixpkgsFun {
|
|
||||||
localSystem = {
|
|
||||||
inherit system;
|
|
||||||
platform = stdenv.hostPlatform.platform // { inherit kernelArch; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
# This maps each entry in lib.systems.examples to its own package
|
# This maps each entry in lib.systems.examples to its own package
|
||||||
# set. Each of these will contain all packages cross compiled for
|
# set. Each of these will contain all packages cross compiled for
|
||||||
# that target system. For instance, pkgsCross.rasberryPi.hello,
|
# that target system. For instance, pkgsCross.rasberryPi.hello,
|
||||||
|
@ -155,11 +137,27 @@ let
|
||||||
# All packages built with the Musl libc. This will override the
|
# All packages built with the Musl libc. This will override the
|
||||||
# default GNU libc on Linux systems. Non-Linux systems are not
|
# default GNU libc on Linux systems. Non-Linux systems are not
|
||||||
# supported.
|
# supported.
|
||||||
pkgsMusl = forceLibc "musl";
|
pkgsMusl = nixpkgsFun {
|
||||||
|
localSystem = {
|
||||||
|
parsed = stdenv.hostPlatform.parsed // {
|
||||||
|
abi = {
|
||||||
|
"gnu" = lib.systems.parse.abis.musl;
|
||||||
|
"gnueabi" = lib.systems.parse.abis.musleabi;
|
||||||
|
"gnueabihf" = lib.systems.parse.abis.musleabihf;
|
||||||
|
}.${stdenv.hostPlatform.parsed.abi.name} or lib.systems.parse.abis.musl;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# All packages built for i686 Linux.
|
# All packages built for i686 Linux.
|
||||||
# Used by wine, firefox with debugging version of Flash, ...
|
# Used by wine, firefox with debugging version of Flash, ...
|
||||||
pkgsi686Linux = forceSystem "i686-linux" "i386";
|
pkgsi686Linux = nixpkgsFun {
|
||||||
|
localSystem = {
|
||||||
|
parsed = stdenv.hostPlatform.parsed // {
|
||||||
|
cpu = lib.systems.parse.cpuTypes.i686;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# The complete chain of package set builders, applied from top to bottom.
|
# The complete chain of package set builders, applied from top to bottom.
|
||||||
|
|
Loading…
Reference in a new issue