diff --git a/pkgs/development/python-modules/pyuv/default.nix b/pkgs/development/python-modules/pyuv/default.nix new file mode 100644 index 000000000000..04e2c2f08185 --- /dev/null +++ b/pkgs/development/python-modules/pyuv/default.nix @@ -0,0 +1,29 @@ +{ stdenv +, buildPythonPackage +, fetchurl +, isPyPy +, pkgs +}: + +buildPythonPackage rec { + pname = "pyuv"; + version = "1.2.0"; + disabled = isPyPy; # see https://github.com/saghul/pyuv/issues/49 + + src = pkgs.fetchurl { + url = "https://github.com/saghul/pyuv/archive/${pname}-${version}.tar.gz"; + sha256 = "19yl1l5l6dq1xr8xcv6dhx1avm350nr4v2358iggcx4ma631rycx"; + }; + + patches = [ ./pyuv-external-libuv.patch ]; + + buildInputs = [ pkgs.libuv ]; + + meta = with stdenv.lib; { + description = "Python interface for libuv"; + homepage = https://github.com/saghul/pyuv; + repositories.git = git://github.com/saghul/pyuv.git; + license = licenses.mit; + }; + +} diff --git a/pkgs/development/python-modules/pyuv-external-libuv.patch b/pkgs/development/python-modules/pyuv/pyuv-external-libuv.patch similarity index 100% rename from pkgs/development/python-modules/pyuv-external-libuv.patch rename to pkgs/development/python-modules/pyuv/pyuv-external-libuv.patch diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4dc96f898ba3..650eab1cdd8e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4077,26 +4077,7 @@ in { user-agents = callPackage ../development/python-modules/user-agents { }; - pyuv = buildPythonPackage rec { - name = "pyuv-1.2.0"; - disabled = isPyPy; # see https://github.com/saghul/pyuv/issues/49 - - src = pkgs.fetchurl { - url = "https://github.com/saghul/pyuv/archive/${name}.tar.gz"; - sha256 = "19yl1l5l6dq1xr8xcv6dhx1avm350nr4v2358iggcx4ma631rycx"; - }; - - patches = [ ../development/python-modules/pyuv-external-libuv.patch ]; - - buildInputs = with self; [ pkgs.libuv ]; - - meta = { - description = "Python interface for libuv"; - homepage = https://github.com/saghul/pyuv; - repositories.git = git://github.com/saghul/pyuv.git; - license = licenses.mit; - }; - }; + pyuv = callPackage ../development/python-modules/pyuv { }; vega_datasets = callPackage ../development/python-modules/vega_datasets { };