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:
@@ -15,7 +15,7 @@
|
||||
with lib;
|
||||
let
|
||||
inherit (python3Packages) python dbus-python;
|
||||
shouldUsePkg = pkg: if pkg != null && lib.any (lib.meta.platformMatch stdenv.hostPlatform) pkg.meta.platforms then pkg else null;
|
||||
shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
|
||||
|
||||
libOnly = prefix == "lib";
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
shouldUsePkg = pkg: if pkg != null && lib.any (lib.meta.platformMatch stdenv.hostPlatform) pkg.meta.platforms then pkg else null;
|
||||
shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
|
||||
|
||||
optAlsaLib = shouldUsePkg alsaLib;
|
||||
optDb = shouldUsePkg db;
|
||||
|
||||
Reference in New Issue
Block a user