diff --git a/pkgs/development/libraries/wiredtiger/default.nix b/pkgs/development/libraries/wiredtiger/default.nix index 9d11b98b1cbd..c905c40cf960 100644 --- a/pkgs/development/libraries/wiredtiger/default.nix +++ b/pkgs/development/libraries/wiredtiger/default.nix @@ -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; diff --git a/pkgs/misc/jackaudio/default.nix b/pkgs/misc/jackaudio/default.nix index a242f0261c77..0ed0246a8813 100644 --- a/pkgs/misc/jackaudio/default.nix +++ b/pkgs/misc/jackaudio/default.nix @@ -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"; diff --git a/pkgs/misc/jackaudio/jack1.nix b/pkgs/misc/jackaudio/jack1.nix index 28ce85bd8a3f..43d23dd525ae 100644 --- a/pkgs/misc/jackaudio/jack1.nix +++ b/pkgs/misc/jackaudio/jack1.nix @@ -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; diff --git a/pkgs/os-specific/linux/ffado/default.nix b/pkgs/os-specific/linux/ffado/default.nix index 4e2d2b388419..4e3e373d244c 100644 --- a/pkgs/os-specific/linux/ffado/default.nix +++ b/pkgs/os-specific/linux/ffado/default.nix @@ -11,7 +11,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; libOnly = prefix == "lib"; diff --git a/pkgs/servers/shishi/default.nix b/pkgs/servers/shishi/default.nix index 535571f46e20..1540a6f1fd18 100644 --- a/pkgs/servers/shishi/default.nix +++ b/pkgs/servers/shishi/default.nix @@ -14,7 +14,7 @@ let mkWith = mkFlag "with-" "without-"; mkOther = mkFlag "" "" true; - 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; optPam = shouldUsePkg pam; optLibidn = shouldUsePkg libidn; diff --git a/pkgs/tools/filesystems/ceph/generic.nix b/pkgs/tools/filesystems/ceph/generic.nix index 32b85eaa6815..3d35a10f3b3b 100644 --- a/pkgs/tools/filesystems/ceph/generic.nix +++ b/pkgs/tools/filesystems/ceph/generic.nix @@ -37,8 +37,7 @@ with stdenv.lib; let shouldUsePkg = pkg_: let pkg = (builtins.tryEval pkg_).value; - in if lib.any (x: x == system) (pkg.meta.platforms or []) - then pkg else null; + in if pkg.meta.available or false then pkg else null; optYasm = shouldUsePkg yasm; optFcgi = shouldUsePkg fcgi;