From 61ed2b6ca1f1c68e6a62566c8c3cfdb2550a45cc Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Tue, 16 Oct 2018 14:27:29 -0400 Subject: [PATCH] pythonPackages.enum: refactor move to python-modules --- .../python-modules/enum/default.nix | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 21 +-------------- 2 files changed, 27 insertions(+), 20 deletions(-) create mode 100644 pkgs/development/python-modules/enum/default.nix diff --git a/pkgs/development/python-modules/enum/default.nix b/pkgs/development/python-modules/enum/default.nix new file mode 100644 index 000000000000..70462e5f4033 --- /dev/null +++ b/pkgs/development/python-modules/enum/default.nix @@ -0,0 +1,26 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, isPy3k +, isPyPy +}: + +buildPythonPackage rec { + pname = "enum"; + version = "0.4.4"; + disabled = isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "9bdfacf543baf2350df7613eb37f598a802f346985ca0dc1548be6494140fdff"; + }; + + doCheck = !isPyPy; + + meta = with stdenv.lib; { + homepage = https://pypi.python.org/pypi/enum/; + description = "Robust enumerated type support in Python"; + license = licenses.gpl2; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fb133d40fefb..a7668070403e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2346,26 +2346,7 @@ in { elpy = callPackage ../development/python-modules/elpy { }; - enum = buildPythonPackage rec { - name = "enum-0.4.4"; - disabled = isPy3k; - - src = pkgs.fetchurl { - url = "mirror://pypi/e/enum/${name}.tar.gz"; - sha256 = "9bdfacf543baf2350df7613eb37f598a802f346985ca0dc1548be6494140fdff"; - }; - - doCheck = !isPyPy; - - buildInputs = with self; [ ]; - - propagatedBuildInputs = with self; [ ]; - - meta = { - homepage = https://pypi.python.org/pypi/enum/; - description = "Robust enumerated type support in Python"; - }; - }; + enum = callPackage ../development/python-modules/enum { }; enum-compat = callPackage ../development/python-modules/enum-compat { };