diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-08-19 13:03:53 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-08-19 13:03:53 +0000 |
commit | 273bab6bb6d040a18d0fc7f00ea797faefa7b991 (patch) | |
tree | 4776aa2e149f294f54731ccdf6882893ead398a2 /lib/systems | |
parent | 456481aa3dd633038c86635f3bcf83d339254119 (diff) |
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.
Diffstat (limited to 'lib/systems')
-rw-r--r-- | lib/systems/inspect.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix index 2fba95aa1a67d..718954e0839a1 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 ]; |