about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Ostrouchov <chris.ostrouchov@gmail.com>2018-10-15 16:59:06 -0400
committerFrederik Rietdijk <fridh@fridh.nl>2018-10-17 07:46:56 +0200
commit599b9045bae6deac0683610bf8f0bad86dd1ac1b (patch)
tree64344d86ef66b9aa6de892bde050a7134a17b8ac
parent7e8a4f67fefadd5598cc37d0d08dba1c1a336a99 (diff)
downloadnixlib-599b9045bae6deac0683610bf8f0bad86dd1ac1b.tar
nixlib-599b9045bae6deac0683610bf8f0bad86dd1ac1b.tar.gz
nixlib-599b9045bae6deac0683610bf8f0bad86dd1ac1b.tar.bz2
nixlib-599b9045bae6deac0683610bf8f0bad86dd1ac1b.tar.lz
nixlib-599b9045bae6deac0683610bf8f0bad86dd1ac1b.tar.xz
nixlib-599b9045bae6deac0683610bf8f0bad86dd1ac1b.tar.zst
nixlib-599b9045bae6deac0683610bf8f0bad86dd1ac1b.zip
pythonPackages.python-Levenshtein: refactor move to python-modules
-rw-r--r--pkgs/development/python-modules/python-levenshtein/default.nix25
-rw-r--r--pkgs/top-level/python-packages.nix20
2 files changed, 26 insertions, 19 deletions
diff --git a/pkgs/development/python-modules/python-levenshtein/default.nix b/pkgs/development/python-modules/python-levenshtein/default.nix
new file mode 100644
index 000000000000..7a16621da0a5
--- /dev/null
+++ b/pkgs/development/python-modules/python-levenshtein/default.nix
@@ -0,0 +1,25 @@
+{ stdenv
+, buildPythonPackage
+, fetchPypi
+}:
+
+buildPythonPackage rec {
+  pname = "python-Levenshtein";
+  version = "0.12.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3";
+  };
+
+  # No tests included in archive
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Functions for fast computation of Levenshtein distance and string similarity";
+    homepage    = "https://github.com/ztane/python-Levenshtein";
+    license     = licenses.gpl2;
+    maintainers = with maintainers; [ aske ];
+  };
+
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 2ce4f5cb9848..80bb7a51a907 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -5686,25 +5686,7 @@ in {
 
   python_openzwave = callPackage ../development/python-modules/python_openzwave { };
 
-  python-Levenshtein = buildPythonPackage rec {
-    name = "python-Levenshtein-${version}";
-    version = "0.12.0";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/p/python-Levenshtein/${name}.tar.gz";
-      sha256 = "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3";
-    };
-
-    # No tests included in archive
-    doCheck = false;
-
-    meta = {
-      description = "Functions for fast computation of Levenshtein distance and string similarity";
-      homepage    = "https://github.com/ztane/python-Levenshtein";
-      license     = licenses.gpl2;
-      maintainers = with maintainers; [ aske ];
-    };
-  };
+  python-Levenshtein = callPackage ../development/python-modules/python-levenshtein { };
 
   libcloud = buildPythonPackage (rec {
     name = "libcloud-1.2.1";