pythonPackages.pyev: Fix expression to work on Darwin

This commit is contained in:
John Wiegley 2017-01-05 13:33:49 -08:00
parent 1f6bb81b06
commit bae778e86c
No known key found for this signature in database
GPG key ID: C144D8F4F19FE630

View file

@ -20067,11 +20067,18 @@ in {
buildInputs = [ pkgs.libev ];
postPatch = ''
libev_so=${pkgs.libev}/lib/libev.so.4
test -f "$libev_so" || { echo "ERROR: File $libev_so does not exist, please fix nix expression for pyev"; exit 1; }
sed -i -e "s|libev_dll_name = find_library(\"ev\")|libev_dll_name = \"$libev_so\"|" setup.py
'';
postPatch =
if !stdenv.isDarwin
then ''
libev_so=${pkgs.libev}/lib/libev.so.4
test -f "$libev_so" || { echo "ERROR: File $libev_so does not exist, please fix nix expression for pyev"; exit 1; }
sed -i -e "s|libev_dll_name = find_library(\"ev\")|libev_dll_name = \"$libev_so\"|" setup.py
''
else ''
libev_so=${pkgs.libev}/lib/libev.4.dylib
test -f "$libev_so" || { echo "ERROR: File $libev_so does not exist, please fix nix expression for pyev"; exit 1; }
sed -i -e "s|libev_dll_name = find_library(\"ev\")|libev_dll_name = \"$libev_so\"|" setup.py
'';
meta = {
description = "Python bindings for libev";