treewide: Make shouldUsePackages copypasta use meta.available
The old way depended on old list-of-strings `meta.platforms`, and was not good for cross.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
with stdenv.lib;
|
||||
let
|
||||
inherit (python2Packages) python dbus-python;
|
||||
shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
|
||||
shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null;
|
||||
|
||||
libOnly = prefix == "lib";
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
|
||||
shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null;
|
||||
|
||||
optAlsaLib = shouldUsePkg alsaLib;
|
||||
optDb = shouldUsePkg db;
|
||||
|
||||
Reference in New Issue
Block a user