diff options
author | John Ericson <Ericson2314@yahoo.com> | 2018-03-18 13:51:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-18 13:51:03 -0400 |
commit | 2fa2197a96fec6a15623bfab96b27d2b1fbe8949 (patch) | |
tree | 07fc5a426396813f0afc123d2a3860dc9331bad7 /lib | |
parent | 38c4c3acd7d8a7eb31672e83cec04cc17afdbac5 (diff) | |
parent | eae19f3c28503a8623b0fee10bfb0b3322122637 (diff) | |
download | nixlib-2fa2197a96fec6a15623bfab96b27d2b1fbe8949.tar nixlib-2fa2197a96fec6a15623bfab96b27d2b1fbe8949.tar.gz nixlib-2fa2197a96fec6a15623bfab96b27d2b1fbe8949.tar.bz2 nixlib-2fa2197a96fec6a15623bfab96b27d2b1fbe8949.tar.lz nixlib-2fa2197a96fec6a15623bfab96b27d2b1fbe8949.tar.xz nixlib-2fa2197a96fec6a15623bfab96b27d2b1fbe8949.tar.zst nixlib-2fa2197a96fec6a15623bfab96b27d2b1fbe8949.zip |
Merge pull request #34444 from obsidiansystems/meta-check
lib: Fix #30902
Diffstat (limited to 'lib')
-rw-r--r-- | lib/default.nix | 2 | ||||
-rw-r--r-- | lib/systems/default.nix | 1 | ||||
-rw-r--r-- | lib/systems/doubles.nix | 4 | ||||
-rw-r--r-- | lib/systems/for-meta.nix | 27 |
4 files changed, 31 insertions, 3 deletions
diff --git a/lib/default.nix b/lib/default.nix index 7bd02106f7b6..cbe0a0ba21b5 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -47,7 +47,7 @@ let filesystem = callLibs ./filesystem.nix; # back-compat aliases - platforms = systems.doubles; + platforms = systems.forMeta; inherit (builtins) add addErrorContext attrNames concatLists deepSeq elem elemAt filter genericClosure genList diff --git a/lib/systems/default.nix b/lib/systems/default.nix index d5a206e620c8..bd408e00bb14 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -3,6 +3,7 @@ rec { doubles = import ./doubles.nix { inherit lib; }; + forMeta = import ./for-meta.nix { inherit lib; }; parse = import ./parse.nix { inherit lib; }; inspect = import ./inspect.nix { inherit lib; }; platforms = import ./platforms.nix { inherit lib; }; diff --git a/lib/systems/doubles.nix b/lib/systems/doubles.nix index 0e1ee62ac950..012a1786a3cc 100644 --- a/lib/systems/doubles.nix +++ b/lib/systems/doubles.nix @@ -30,14 +30,14 @@ in rec { aarch64 = filterDoubles predicates.isAarch64; x86 = filterDoubles predicates.isx86; i686 = filterDoubles predicates.isi686; - mips = filterDoubles predicates.isMips; x86_64 = filterDoubles predicates.isx86_64; + mips = filterDoubles predicates.isMips; cygwin = filterDoubles predicates.isCygwin; darwin = filterDoubles predicates.isDarwin; freebsd = filterDoubles predicates.isFreeBSD; # Should be better, but MinGW is unclear, and HURD is bit-rotted. - gnu = filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnu; }); + gnu = filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnu; }); illumos = filterDoubles predicates.isSunOS; linux = filterDoubles predicates.isLinux; netbsd = filterDoubles predicates.isNetBSD; diff --git a/lib/systems/for-meta.nix b/lib/systems/for-meta.nix new file mode 100644 index 000000000000..0a7a4bf5b0cc --- /dev/null +++ b/lib/systems/for-meta.nix @@ -0,0 +1,27 @@ +{ lib }: +let + inherit (lib.systems) parse; + inherit (lib.systems.inspect) patterns; + +in rec { + inherit (lib.systems.doubles) all mesaPlatforms; + none = []; + + arm = [ patterns.Arm ]; + aarch64 = [ patterns.Aarch64 ]; + x86 = [ patterns.x86 ]; + i686 = [ patterns.i686 ]; + x86_64 = [ patterns.x86_64 ]; + mips = [ patterns.Mips ]; + + cygwin = [ patterns.Cygwin ]; + darwin = [ patterns.Darwin ]; + freebsd = [ patterns.FreeBSD ]; + # Should be better, but MinGW is unclear, and HURD is bit-rotted. + gnu = [ { kernel = parse.kernels.linux; abi = parse.abis.gnu; } ]; + illumos = [ patterns.SunOS ]; + linux = [ patterns.Linux ]; + netbsd = [ patterns.NetBSD ]; + openbsd = [ patterns.OpenBSD ]; + unix = patterns.Unix; # Actually a list +} |