From 217626a3e900ad4726237ade5aa46fddbc91484b Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sat, 20 Jan 2018 13:01:53 +0100 Subject: [PATCH] python.pkgs.click-threading: move and fix expression --- .../click-threading/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 27 +-------------- 2 files changed, 35 insertions(+), 26 deletions(-) create mode 100644 pkgs/development/python-modules/click-threading/default.nix diff --git a/pkgs/development/python-modules/click-threading/default.nix b/pkgs/development/python-modules/click-threading/default.nix new file mode 100644 index 000000000000..5be41007c6a9 --- /dev/null +++ b/pkgs/development/python-modules/click-threading/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytest +, click +, isPy3k +, futures +}: + +buildPythonPackage rec { + pname = "click-threading"; + version = "0.4.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "400b0bb63d9096b6bf2806efaf742a1cc8b6c88e0484f0afe7d7a7f0e9870609"; + }; + + checkInputs = [ pytest ]; + propagatedBuildInputs = [ click ] ++ lib.optional (!isPy3k) futures; + + checkPhase = '' + py.test + ''; + + # Tests are broken on 3.x + doCheck = !isPy3k; + + meta = { + homepage = https://github.com/click-contrib/click-threading/; + description = "Multithreaded Click apps made easy"; + license = lib.licenses.mit; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6cd94286add2..9ff86d863ff7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2409,32 +2409,7 @@ in { click-plugins = callPackage ../development/python-modules/click-plugins {}; - click-threading = buildPythonPackage rec { - version = "0.4.2"; - name = "click-threading-${version}"; - - src = pkgs.fetchurl { - url = "mirror://pypi/c/click-threading/${name}.tar.gz"; - sha256 = "400b0bb63d9096b6bf2806efaf742a1cc8b6c88e0484f0afe7d7a7f0e9870609"; - }; - - checkInputs = with self; [ pytest_29 ]; - propagatedBuildInputs = with self; [ click ] ++ optional (!isPy3k) futures; - - checkPhase = '' - py.test - ''; - - # Tests are broken on 3.x - doCheck = !isPy3k; - - meta = { - homepage = https://github.com/click-contrib/click-threading/; - description = "Multithreaded Click apps made easy"; - license = licenses.mit; - maintainers = with maintainers; [ ]; - }; - }; + click-threading = callPackage ../development/python-modules/click-threading {}; cligj = callPackage ../development/python-modules/cligj { };