From b714a38bba7ed15002b16f498dec52455f0c8950 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sat, 29 Jul 2017 11:39:56 +0200 Subject: [PATCH] python.pkgs.cycler: move expression --- .../python-modules/cycler/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 28 +------------- 2 files changed, 38 insertions(+), 27 deletions(-) create mode 100644 pkgs/development/python-modules/cycler/default.nix diff --git a/pkgs/development/python-modules/cycler/default.nix b/pkgs/development/python-modules/cycler/default.nix new file mode 100644 index 000000000000..e182f55cdc00 --- /dev/null +++ b/pkgs/development/python-modules/cycler/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, coverage +, nose +, six +, python +}: + +buildPythonPackage rec { + pname = "cycler"; + name = "${pname}-${version}"; + version = "0.10.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "cd7b2d1018258d7247a71425e9f26463dfb444d411c39569972f4ce586b0c9d8"; + }; + + checkInputs = [ coverage nose ]; + propagatedBuildInputs = [ six ]; + + checkPhase = '' + ${python.interpreter} run_tests.py + ''; + + # Tests were not included in release. + # https://github.com/matplotlib/cycler/issues/31 + doCheck = false; + + meta = { + description = "Composable style cycles"; + homepage = http://github.com/matplotlib/cycler; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ fridh ]; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e87630212cef..45c3b529dcc4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1865,33 +1865,7 @@ in { }; }; - cycler = buildPythonPackage rec { - name = "cycler-${version}"; - version = "0.10.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/C/Cycler/${name}.tar.gz"; - sha256 = "cd7b2d1018258d7247a71425e9f26463dfb444d411c39569972f4ce586b0c9d8"; - }; - - buildInputs = with self; [ coverage nose ]; - propagatedBuildInputs = with self; [ six ]; - - checkPhase = '' - ${python.interpreter} run_tests.py - ''; - - # Tests were not included in release. - # https://github.com/matplotlib/cycler/issues/31 - doCheck = false; - - meta = { - description = "Composable style cycles"; - homepage = http://github.com/matplotlib/cycler; - license = licenses.bsd3; - maintainers = with maintainers; [ fridh ]; - }; - }; + cycler = callPackage ../development/python-modules/cycler { }; datadog = buildPythonPackage rec { name = "${pname}-${version}";