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