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.
launchpad/nixpkgs/master
Alyssa Ross 3 years ago
parent 456481aa3d
commit 273bab6bb6
No known key found for this signature in database
GPG Key ID: F9DBED4859B271C0
  1. 1
      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 ];

Loading…
Cancel
Save