summary refs log tree commit diff
path: root/pkgs/development/python-modules/nltk
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2017-11-05 10:45:54 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2017-11-05 10:45:54 +0100
commit07eeeb36008b63c8edfc75fce79beb028cd5c1e4 (patch)
tree815bfac4b5ee67fc223ea785e965c2680bac4db0 /pkgs/development/python-modules/nltk
parent37d5539aeb10973aba9c84f5214625c85e9c39b4 (diff)
downloadnixpkgs-07eeeb36008b63c8edfc75fce79beb028cd5c1e4.tar
nixpkgs-07eeeb36008b63c8edfc75fce79beb028cd5c1e4.tar.gz
nixpkgs-07eeeb36008b63c8edfc75fce79beb028cd5c1e4.tar.bz2
nixpkgs-07eeeb36008b63c8edfc75fce79beb028cd5c1e4.tar.lz
nixpkgs-07eeeb36008b63c8edfc75fce79beb028cd5c1e4.tar.xz
nixpkgs-07eeeb36008b63c8edfc75fce79beb028cd5c1e4.tar.zst
nixpkgs-07eeeb36008b63c8edfc75fce79beb028cd5c1e4.zip
Python: move expressions in python-modules to their own folders
Diffstat (limited to 'pkgs/development/python-modules/nltk')
-rw-r--r--pkgs/development/python-modules/nltk/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/nltk/default.nix b/pkgs/development/python-modules/nltk/default.nix
new file mode 100644
index 00000000000..d30e030a049
--- /dev/null
+++ b/pkgs/development/python-modules/nltk/default.nix
@@ -0,0 +1,31 @@
+{ fetchurl, buildPythonPackage, isPy33, lib, six, pythonAtLeast, pythonOlder }:
+
+buildPythonPackage rec {
+  version = "3.2.5";
+  pname = "nltk";
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "mirror://pypi/n/nltk/nltk-${version}.tar.gz";
+    sha256 = "2661f9971d983db314bbebd51ba770811a362c6597fd0f303bb1d3beadcb4834";
+  };
+
+  propagatedBuildInputs = [ six ];
+
+  disabled = pythonOlder "2.7" || pythonOlder "3.4" && (pythonAtLeast "3.0");
+
+  # Tests require some data, the downloading of which is impure. It would
+  # probably make sense to make the data another derivation, but then feeding
+  # that into the tests (given that we need nltk itself to download the data,
+  # unless there's an easy way to download it without nltk's downloader) might
+  # be complicated. For now let's just disable the tests and hope for the
+  # best.
+  doCheck = false;
+
+  meta = {
+    description = "Natural Language Processing ToolKit";
+    homepage = http://nltk.org/;
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ lheckemann ];
+  };
+}