ncurses: Fix shouldUsePkg on darwin

This commit is contained in:
Shea Levy 2015-05-12 06:26:31 -07:00
parent 4a22a4429c
commit 82ba13111c

View file

@ -16,7 +16,11 @@ 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_: let
pkg = (builtins.tryEval pkg_).value;
in if stdenv.lib.any (x: x == stdenv.system) (pkg.meta.platforms or [])
then pkg
else null;
buildShared = !stdenv.isDarwin;