From 954880ed544aeb5297652a313346150b56e24d2c Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 5 Apr 2018 21:18:15 +0200 Subject: [PATCH] python.pkgs.pyzmq: move expression --- .../python-modules/pyzmq/default.nix | 29 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 16 +--------- 2 files changed, 30 insertions(+), 15 deletions(-) create mode 100644 pkgs/development/python-modules/pyzmq/default.nix diff --git a/pkgs/development/python-modules/pyzmq/default.nix b/pkgs/development/python-modules/pyzmq/default.nix new file mode 100644 index 000000000000..0e06584f20db --- /dev/null +++ b/pkgs/development/python-modules/pyzmq/default.nix @@ -0,0 +1,29 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytest +, tornado +, zeromq3 +, py +, python +}: + +buildPythonPackage rec { + pname = "pyzmq"; + version = "16.0.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "0322543fff5ab6f87d11a8a099c4c07dd8a1719040084b6ce9162bcdf5c45c9d"; + }; + + checkInputs = [ pytest tornado ]; + buildInputs = [ zeromq3]; + propagatedBuildInputs = [ py ]; + + # Disable broken test + # https://github.com/zeromq/pyzmq/issues/799 + checkPhase = '' + py.test $out/${python.sitePackages}/zmq/ -k "not test_large_send and not test_recv_json_cancelled" + ''; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 29445c171d95..9ff744cfea56 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15995,21 +15995,7 @@ EOF }; }; - pyzmq = buildPythonPackage rec { - name = "pyzmq-16.0.2"; - src = pkgs.fetchurl { - url = "mirror://pypi/p/pyzmq/${name}.tar.gz"; - sha256 = "0322543fff5ab6f87d11a8a099c4c07dd8a1719040084b6ce9162bcdf5c45c9d"; - }; - buildInputs = with self; [ pkgs.zeromq3 pytest tornado ]; - propagatedBuildInputs = [ self.py ]; - - # Disable broken test - # https://github.com/zeromq/pyzmq/issues/799 - checkPhase = '' - py.test $out/${python.sitePackages}/zmq/ -k "not test_large_send and not test_recv_json_cancelled" - ''; - }; + pyzmq = callPackage ../development/python-modules/pyzmq { }; testfixtures = callPackage ../development/python-modules/testfixtures {};