Skip to content

Commit

Permalink
pythonPackages.pyev: Fix expression to work on Darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
jwiegley committed Jan 5, 2017
1 parent 1f6bb81 commit bae778e
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -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";
Expand Down

0 comments on commit bae778e

Please sign in to comment.