diff --git a/pkgs/development/python-modules/pika/default.nix b/pkgs/development/python-modules/pika/default.nix new file mode 100644 index 00000000000..3cc1ba3b00f --- /dev/null +++ b/pkgs/development/python-modules/pika/default.nix @@ -0,0 +1,35 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, isPy3k +, nose +, mock +, pyyaml +, unittest2 +, pyev +, twisted +, tornado +}: + +buildPythonPackage rec { + pname = "pika"; + version = "0.10.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"; + }; + + # Tests require twisted which is only availalble for python-2.x + doCheck = !isPy3k; + + buildInputs = [ nose mock pyyaml unittest2 pyev ] + ++ stdenv.lib.optionals (!isPy3k) [ twisted tornado ]; + + meta = with stdenv.lib; { + description = "Pure-Python implementation of the AMQP 0-9-1 protocol"; + homepage = https://pika.readthedocs.org; + license = licenses.bsd3; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c15863042e1..a696f675a93 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3154,26 +3154,7 @@ in { glibcLocales = pkgs.glibcLocales; }; - pika = buildPythonPackage rec { - name = "pika-${version}"; - version = "0.10.0"; - - src = pkgs.fetchurl { - url = "https://pypi.python.org/packages/source/p/pika/${name}.tar.gz"; - sha256 = "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"; - }; - - # Tests require twisted which is only availalble for python-2.x - doCheck = !isPy3k; - - buildInputs = with self; [ nose mock pyyaml unittest2 pyev ] ++ optionals (!isPy3k) [ twisted tornado ]; - - meta = { - description = "Pure-Python implementation of the AMQP 0-9-1 protocol"; - homepage = https://pika.readthedocs.org; - license = licenses.bsd3; - }; - }; + pika = callPackage ../development/python-modules/pika { }; pika-pool = callPackage ../development/python-modules/pika-pool { };