···8787 then { system = elem; }
8888 else { parsed = elem; };
8989 in lib.matchAttrs pattern platform;
9090+9191+ /* Check if a package is available on a given platform.
9292+9393+ A package is available on a platform if both
9494+9595+ 1. One of `meta.platforms` pattern matches the given platform.
9696+9797+ 2. None of `meta.badPlatforms` pattern matches the given platform.
9898+ */
9999+ availableOn = platform: pkg:
100100+ lib.any (platformMatch platform) pkg.meta.platforms &&
101101+ lib.all (elem: !platformMatch platform elem) (pkg.meta.badPlatforms or []);
90102}
+4-4
lib/types.nix
···260260 };
261261 u8 = unsign 8 256;
262262 u16 = unsign 16 65536;
263263- # the biggest int a 64-bit Nix accepts is 2^63 - 1 (9223372036854775808), for a 32-bit Nix it is 2^31 - 1 (2147483647)
264264- # the smallest int a 64-bit Nix accepts is -2^63 (-9223372036854775807), for a 32-bit Nix it is -2^31 (-2147483648)
265265- # u32 = unsign 32 4294967296;
263263+ # the biggest int Nix accepts is 2^63 - 1 (9223372036854775808)
264264+ # the smallest int Nix accepts is -2^63 (-9223372036854775807)
265265+ u32 = unsign 32 4294967296;
266266 # u64 = unsign 64 18446744073709551616;
267267268268 s8 = sign 8 256;
269269 s16 = sign 16 65536;
270270- # s32 = sign 32 4294967296;
270270+ s32 = sign 32 4294967296;
271271 };
272272273273 # Alias of u16 for a port number
···18181919, # If enabled, GHC will be built with the GPL-free but slower integer-simple
2020 # library instead of the faster but GPLed integer-gmp library.
2121- enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
2121+ enableIntegerSimple ? !(lib.meta.availableOn stdenv.hostPlatform gmp), gmp
22222323, # If enabled, use -fPIC when compiling static libs.
2424 enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+1-1
pkgs/development/compilers/ghc/8.8.4.nix
···18181919, # If enabled, GHC will be built with the GPL-free but slower integer-simple
2020 # library instead of the faster but GPLed integer-gmp library.
2121- enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
2121+ enableIntegerSimple ? !(lib.meta.availableOn stdenv.hostPlatform gmp), gmp
22222323, # If enabled, use -fPIC when compiling static libs.
2424 enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+1-1
pkgs/development/compilers/ghc/9.0.1.nix
···19192020, # If enabled, GHC will be built with the GPL-free but slower integer-simple
2121 # library instead of the faster but GPLed integer-gmp library.
2222- enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
2222+ enableIntegerSimple ? !(lib.meta.availableOn stdenv.hostPlatform gmp), gmp
23232424, # If enabled, use -fPIC when compiling static libs.
2525 enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+1-1
pkgs/development/compilers/ghc/head.nix
···22222323, # If enabled, GHC will be built with the GPL-free but slightly slower native
2424 # bignum backend instead of the faster but GPLed gmp backend.
2525- enableNativeBignum ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms)
2525+ enableNativeBignum ? !(lib.meta.availableOn stdenv.hostPlatform gmp)
2626, gmp
27272828, # If enabled, use -fPIC when compiling static libs.