Merge pull request #114374 from oxalica/lib/platform-support-check
lib.meta: introduce `availableOn` to check package availability on given platform
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
||||
# library instead of the faster but GPLed integer-gmp library.
|
||||
enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
enableIntegerSimple ? !(lib.meta.availableOn stdenv.hostPlatform gmp), gmp
|
||||
|
||||
, # If enabled, use -fPIC when compiling static libs.
|
||||
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
||||
# library instead of the faster but GPLed integer-gmp library.
|
||||
enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
enableIntegerSimple ? !(lib.meta.availableOn stdenv.hostPlatform gmp), gmp
|
||||
|
||||
, # If enabled, use -fPIC when compiling static libs.
|
||||
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
||||
# library instead of the faster but GPLed integer-gmp library.
|
||||
enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
enableIntegerSimple ? !(lib.meta.availableOn stdenv.hostPlatform gmp), gmp
|
||||
|
||||
, # If enabled, use -fPIC when compiling static libs.
|
||||
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
, # If enabled, GHC will be built with the GPL-free but slightly slower native
|
||||
# bignum backend instead of the faster but GPLed gmp backend.
|
||||
enableNativeBignum ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms)
|
||||
enableNativeBignum ? !(lib.meta.availableOn stdenv.hostPlatform gmp)
|
||||
, gmp
|
||||
|
||||
, # If enabled, use -fPIC when compiling static libs.
|
||||
|
||||
Reference in New Issue
Block a user