···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}
···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.