From 4d4545185a7953165e8b8c612f7b713102290dc0 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Fri, 6 Sep 2019 23:33:32 +0200 Subject: [PATCH] Revert "pythonPackages.pyev: drop" Package is still referred to. This reverts commit bb5c039fc95bea25133a01e8f1b46a50159f2412. --- .../python-modules/pyev/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/python-modules/pyev/default.nix diff --git a/pkgs/development/python-modules/pyev/default.nix b/pkgs/development/python-modules/pyev/default.nix new file mode 100644 index 00000000000..b5ca0c7ef6c --- /dev/null +++ b/pkgs/development/python-modules/pyev/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, buildPythonPackage, libev }: + +buildPythonPackage rec { + pname = "pyev"; + version = "0.9.0"; + + src = fetchurl { + url = "mirror://pypi/p/pyev/${pname}-${version}.tar.gz"; + sha256 = "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"; + }; + + buildInputs = [ libev ]; + + libEvSharedLibrary = + if !stdenv.isDarwin + then "${libev}/lib/libev.so.4" + else "${libev}/lib/libev.4.dylib"; + + postPatch = '' + test -f "${libEvSharedLibrary}" || { echo "ERROR: File ${libEvSharedLibrary} does not exist, please fix nix expression for pyev"; exit 1; } + sed -i -e "s|libev_dll_name = find_library(\"ev\")|libev_dll_name = \"${libEvSharedLibrary}\"|" setup.py + ''; + + meta = with stdenv.lib; { + description = "Python bindings for libev"; + homepage = https://code.google.com/p/pyev/; + license = licenses.gpl3; + maintainers = [ maintainers.bjornfor ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 19ce618e9e4..e2206878420 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4370,6 +4370,8 @@ in { pyenchant = callPackage ../development/python-modules/pyenchant { }; + pyev = callPackage ../development/python-modules/pyev { }; + pyexcelerator = callPackage ../development/python-modules/pyexcelerator { }; pyext = callPackage ../development/python-modules/pyext { };