···87 then { system = elem; }
88 else { parsed = elem; };
89 in lib.matchAttrs pattern platform;
00000000000090}
···87 then { system = elem; }
88 else { parsed = elem; };
89 in lib.matchAttrs pattern platform;
90+91+ /* Check if a package is available on a given platform.
92+93+ A package is available on a platform if both
94+95+ 1. One of `meta.platforms` pattern matches the given platform.
96+97+ 2. None of `meta.badPlatforms` pattern matches the given platform.
98+ */
99+ availableOn = platform: pkg:
100+ lib.any (platformMatch platform) pkg.meta.platforms &&
101+ lib.all (elem: !platformMatch platform elem) (pkg.meta.badPlatforms or []);
102}
···1819, # If enabled, GHC will be built with the GPL-free but slower integer-simple
20 # library instead of the faster but GPLed integer-gmp library.
21- enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
2223, # If enabled, use -fPIC when compiling static libs.
24 enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
···1819, # If enabled, GHC will be built with the GPL-free but slower integer-simple
20 # library instead of the faster but GPLed integer-gmp library.
21+ enableIntegerSimple ? !(lib.meta.availableOn stdenv.hostPlatform gmp), gmp
2223, # If enabled, use -fPIC when compiling static libs.
24 enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+1-1
pkgs/development/compilers/ghc/8.8.4.nix
···1819, # If enabled, GHC will be built with the GPL-free but slower integer-simple
20 # library instead of the faster but GPLed integer-gmp library.
21- enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
2223, # If enabled, use -fPIC when compiling static libs.
24 enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
···1819, # If enabled, GHC will be built with the GPL-free but slower integer-simple
20 # library instead of the faster but GPLed integer-gmp library.
21+ enableIntegerSimple ? !(lib.meta.availableOn stdenv.hostPlatform gmp), gmp
2223, # If enabled, use -fPIC when compiling static libs.
24 enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+1-1
pkgs/development/compilers/ghc/9.0.1.nix
···1920, # If enabled, GHC will be built with the GPL-free but slower integer-simple
21 # library instead of the faster but GPLed integer-gmp library.
22- enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
2324, # If enabled, use -fPIC when compiling static libs.
25 enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
···1920, # If enabled, GHC will be built with the GPL-free but slower integer-simple
21 # library instead of the faster but GPLed integer-gmp library.
22+ enableIntegerSimple ? !(lib.meta.availableOn stdenv.hostPlatform gmp), gmp
2324, # If enabled, use -fPIC when compiling static libs.
25 enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+1-1
pkgs/development/compilers/ghc/head.nix
···2223, # If enabled, GHC will be built with the GPL-free but slightly slower native
24 # bignum backend instead of the faster but GPLed gmp backend.
25- enableNativeBignum ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms)
26, gmp
2728, # If enabled, use -fPIC when compiling static libs.
···2223, # If enabled, GHC will be built with the GPL-free but slightly slower native
24 # bignum backend instead of the faster but GPLed gmp backend.
25+ enableNativeBignum ? !(lib.meta.availableOn stdenv.hostPlatform gmp)
26, gmp
2728, # If enabled, use -fPIC when compiling static libs.