diff --git a/pkgs/development/libraries/wiredtiger/default.nix b/pkgs/development/libraries/wiredtiger/default.nix index c4d94af850dd..56068c435d80 100644 --- a/pkgs/development/libraries/wiredtiger/default.nix +++ b/pkgs/development/libraries/wiredtiger/default.nix @@ -14,7 +14,7 @@ let mkEnable = mkFlag "enable-" "disable-"; mkWith = mkFlag "with-" "without-"; - shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null; + shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) pkg.meta.platforms 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 391ac107ab71..efd5aa4e9194 100644 --- a/pkgs/misc/jackaudio/default.nix +++ b/pkgs/misc/jackaudio/default.nix @@ -14,7 +14,7 @@ with stdenv.lib; let inherit (python2Packages) python dbus-python; - shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null; + shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) pkg.meta.platforms then pkg else null; libOnly = prefix == "lib"; diff --git a/pkgs/misc/jackaudio/jack1.nix b/pkgs/misc/jackaudio/jack1.nix index c11be4ad0c0c..2e349cf691c9 100644 --- a/pkgs/misc/jackaudio/jack1.nix +++ b/pkgs/misc/jackaudio/jack1.nix @@ -5,7 +5,7 @@ }: let - shouldUsePkg = pkg: if pkg != null && pkg.meta.available then pkg else null; + shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) pkg.meta.platforms 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 4e3e373d244c..85218042cf76 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 && pkg.meta.available then pkg else null; + shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) pkg.meta.platforms then pkg else null; libOnly = prefix == "lib"; diff --git a/pkgs/servers/shishi/default.nix b/pkgs/servers/shishi/default.nix index 1540a6f1fd18..b066ff18bfdc 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 && pkg.meta.available then pkg else null; + shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) pkg.meta.platforms 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 14fedd6610e1..c4856d925299 100644 --- a/pkgs/tools/filesystems/ceph/generic.nix +++ b/pkgs/tools/filesystems/ceph/generic.nix @@ -37,7 +37,8 @@ with stdenv.lib; let shouldUsePkg = pkg_: let pkg = (builtins.tryEval pkg_).value; - in if pkg.meta.available or false then pkg else null; + in if lib.any (lib.meta.platformMatch stdenv.hostPlatform) pkg.meta.platforms + then pkg else null; optYasm = shouldUsePkg yasm; optFcgi = shouldUsePkg fcgi;