From 467455f3305e09b22bde1c9e12c6421e6095e565 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Thu, 25 Oct 2018 20:33:06 -0400 Subject: [PATCH] pythonPackages.fasteners: refactor move to python-modules --- .../python-modules/fasteners/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 24 +------------ 2 files changed, 36 insertions(+), 23 deletions(-) create mode 100644 pkgs/development/python-modules/fasteners/default.nix diff --git a/pkgs/development/python-modules/fasteners/default.nix b/pkgs/development/python-modules/fasteners/default.nix new file mode 100644 index 000000000000..77a6f9b04088 --- /dev/null +++ b/pkgs/development/python-modules/fasteners/default.nix @@ -0,0 +1,35 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, six +, monotonic +, testtools +, python +, isPy3k +}: + +buildPythonPackage rec { + pname = "fasteners"; + version = "0.14.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"; + }; + + propagatedBuildInputs = [ six monotonic testtools ]; + + checkPhase = '' + ${python.interpreter} -m unittest discover + ''; + + # Tests are written for Python 3.x only (concurrent.futures) + doCheck = isPy3k; + + meta = with stdenv.lib; { + description = "Fasteners"; + homepage = https://github.com/harlowja/fasteners; + license = licenses.asl20; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cc10d2ea6d23..8a2fd67f143f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3051,29 +3051,7 @@ in { retrying = callPackage ../development/python-modules/retrying { }; - fasteners = buildPythonPackage rec { - name = "fasteners-${version}"; - version = "0.14.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/f/fasteners/${name}.tar.gz"; - sha256 = "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"; - }; - - propagatedBuildInputs = with self; [ six monotonic testtools ]; - - checkPhase = '' - ${python.interpreter} -m unittest discover - ''; - # Tests are written for Python 3.x only (concurrent.futures) - doCheck = isPy3k; - - - meta = with stdenv.lib; { - description = "Fasteners"; - homepage = https://github.com/harlowja/fasteners; - }; - }; + fasteners = callPackage ../development/python-modules/fasteners { }; aioeventlet = buildPythonPackage rec { name = "aioeventlet-${version}";