about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/python-modules/backports_functools_lru_cache/default.nix24
-rw-r--r--pkgs/top-level/python-packages.nix19
2 files changed, 25 insertions, 18 deletions
diff --git a/pkgs/development/python-modules/backports_functools_lru_cache/default.nix b/pkgs/development/python-modules/backports_functools_lru_cache/default.nix
new file mode 100644
index 000000000000..7ce609d84f04
--- /dev/null
+++ b/pkgs/development/python-modules/backports_functools_lru_cache/default.nix
@@ -0,0 +1,24 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, setuptools_scm
+}:
+
+buildPythonPackage rec {
+  pname = "backports.functools_lru_cache";
+  version = "1.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "444a21bcec4ae177da554321f81a78dc879eaa8f6ea9920cb904830585d31e95";
+  };
+
+  buildInputs = [ setuptools_scm ];
+  doCheck = false; # No proper test
+
+  meta = {
+    description = "Backport of functools.lru_cache";
+    homepage = https://github.com/jaraco/backports.functools_lru_cache;
+    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 1e8fd8dcc911..9de6d98a63fd 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -1040,24 +1040,7 @@ in {
     };
   };
 
-  backports_functools_lru_cache = buildPythonPackage rec {
-    name = "backports.functools_lru_cache-${version}";
-    version = "1.3";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/b/backports_functools_lru_cache/${name}.tar.gz";
-      sha256 = "444a21bcec4ae177da554321f81a78dc879eaa8f6ea9920cb904830585d31e95";
-    };
-
-    buildInputs = with self; [ setuptools_scm ];
-    doCheck = false; # No proper test
-
-    meta = {
-      description = "Backport of functools.lru_cache";
-      homepage = https://github.com/jaraco/backports.functools_lru_cache;
-      license = licenses.mit;
-    };
-  };
+  backports_functools_lru_cache = callPackage ../development/python-modules/backports_functools_lru_cache { };
 
   backports_shutil_get_terminal_size = callPackage ../development/python-modules/backports_shutil_get_terminal_size { };