summary refs log tree commit diff
path: root/pkgs/development/python-modules/pystemmer/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pystemmer/default.nix')
-rw-r--r--pkgs/development/python-modules/pystemmer/default.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pystemmer/default.nix b/pkgs/development/python-modules/pystemmer/default.nix
new file mode 100644
index 000000000000..e569042f729a
--- /dev/null
+++ b/pkgs/development/python-modules/pystemmer/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, python, fetchPypi, buildPythonPackage, cython }:
+
+buildPythonPackage rec {
+  pname = "PyStemmer";
+  version = "1.3.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "d1ac14eb64978c1697fcfba76e3ac7ebe24357c9428e775390f634648947cb91";
+  };
+
+  nativeBuildInputs = [ cython ];
+
+  preBuild = ''
+    cython src/Stemmer.pyx
+  '';
+
+  checkPhase = ''
+    ${python.interpreter} runtests.py
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Snowball stemming algorithms, for information retrieval";
+    homepage = http://snowball.tartarus.org/;
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}