From 273bab6bb6d040a18d0fc7f00ea797faefa7b991 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 19 Aug 2021 13:03:53 +0000 Subject: 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. --- lib/systems/inspect.nix | 1 + 1 file changed, 1 insertion(+) 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 ]; -- cgit 1.4.1