summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-08-19 13:03:53 +0000
committerAlyssa Ross <hi@alyssa.is>2021-08-19 13:03:53 +0000
commit273bab6bb6d040a18d0fc7f00ea797faefa7b991 (patch)
tree4776aa2e149f294f54731ccdf6882893ead398a2
parent456481aa3dd633038c86635f3bcf83d339254119 (diff)
downloadnixpkgs-273bab6bb6d040a18d0fc7f00ea797faefa7b991.tar
nixpkgs-273bab6bb6d040a18d0fc7f00ea797faefa7b991.tar.gz
nixpkgs-273bab6bb6d040a18d0fc7f00ea797faefa7b991.tar.bz2
nixpkgs-273bab6bb6d040a18d0fc7f00ea797faefa7b991.tar.lz
nixpkgs-273bab6bb6d040a18d0fc7f00ea797faefa7b991.tar.xz
nixpkgs-273bab6bb6d040a18d0fc7f00ea797faefa7b991.tar.zst
nixpkgs-273bab6bb6d040a18d0fc7f00ea797faefa7b991.zip
lib.systems.inspect.patterns.isGnu: init
This allows checking e.g. stdenv.hostPlatform.isGnu, just like isMusl
or isUClibc.  It was already possible to check for glibc with
stdenv.hostPlatform.libc == "glibc", but when that doesn't line up
with how every other platform check works, this is apparently
sufficiently non-obvious that we've ended up with stuff like adding
glibc.static if !isMusl, which is obviously wrong.
-rw-r--r--lib/systems/inspect.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix
index 2fba95aa1a6..718954e0839 100644
--- a/lib/systems/inspect.nix
+++ b/lib/systems/inspect.nix
@@ -56,6 +56,7 @@ rec {
     isNone         = { kernel = kernels.none; };
 
     isAndroid      = [ { abi = abis.android; } { abi = abis.androideabi; } ];
+    isGnu          = with abis; map (a: { abi = a; }) [ gnuabi64 gnu gnueabi gnueabihf ];
     isMusl         = with abis; map (a: { abi = a; }) [ musl musleabi musleabihf ];
     isUClibc       = with abis; map (a: { abi = a; }) [ uclibc uclibceabi uclibceabihf ];