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:
John Ericson
2018-03-09 17:58:36 -05:00
parent eeb8419c6a
commit 79d8353b5e
6 changed files with 6 additions and 7 deletions

View File

@@ -15,7 +15,7 @@ let
mkWith = mkFlag "with-" "without-";
mkOther = mkFlag "" "" true;
shouldUsePkg = pkg: if pkg != null && any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null;
optLz4 = shouldUsePkg lz4;
optSnappy = shouldUsePkg snappy;