From 56739bc25feccb9d83f93d8fa183028032cdef88 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 15 Oct 2018 16:01:07 -0400 Subject: [PATCH] pythonPackages.functools32: refactor move to python-modules --- .../python-modules/functools32/default.nix | 22 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 16 +------------- 2 files changed, 23 insertions(+), 15 deletions(-) create mode 100644 pkgs/development/python-modules/functools32/default.nix diff --git a/pkgs/development/python-modules/functools32/default.nix b/pkgs/development/python-modules/functools32/default.nix new file mode 100644 index 000000000000..fea79db3d05b --- /dev/null +++ b/pkgs/development/python-modules/functools32/default.nix @@ -0,0 +1,22 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, isPy3k +}: + +if isPy3k then null else buildPythonPackage rec { + pname = "functools32"; + version = "3.2.3-2"; + + src = fetchPypi { + inherit pname version; + sha256 = "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"; + }; + + meta = with stdenv.lib; { + description = "This is a backport of the functools standard library module from"; + homepage = "https://github.com/MiCHiLU/python-functools32"; + license = licenses.psfl; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 78991a228cc9..d846e9b99ec4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1800,21 +1800,7 @@ in { fastcache = callPackage ../development/python-modules/fastcache { }; - functools32 = if isPy3k then null else buildPythonPackage rec { - name = "functools32-${version}"; - version = "3.2.3-2"; - - src = pkgs.fetchurl { - url = "mirror://pypi/f/functools32/functools32-${version}.tar.gz"; - sha256 = "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"; - }; - - - meta = with stdenv.lib; { - description = "This is a backport of the functools standard library module from"; - homepage = "https://github.com/MiCHiLU/python-functools32"; - }; - }; + functools32 = callPackage ../development/python-modules/functools32 { }; gateone = buildPythonPackage rec { name = "gateone-1.2-0d57c3";