lib.meta: introduce availableOn

This commit is contained in:
oxalica
2021-04-02 19:20:23 +08:00
parent 905ecb920e
commit 354d262db8
14 changed files with 27 additions and 15 deletions
+1 -1
View File
@@ -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";