diff options
author | Andrey Pavlov <couchemar@yandex.ru> | 2019-04-14 13:38:29 +0300 |
---|---|---|
committer | Robert Schütz <rschuetz17@gmail.com> | 2019-04-14 12:38:29 +0200 |
commit | 2e9e63195bf7e371112e95b743c1263759db6e8b (patch) | |
tree | f7ba2fbe12b466a08da1c66f268b2c303a855dda /pkgs/development/python-modules/nltk | |
parent | 0fc80a576a1504e3dae7cf07b7511063bd26246b (diff) |
pythonPackages.nltk: 3.2.5 -> 3.4 (#59204)
Add optional dependency "singledispatch" for python 2.7. Remove "disabled" attribute from derivation.
Diffstat (limited to 'pkgs/development/python-modules/nltk')
-rw-r--r-- | pkgs/development/python-modules/nltk/default.nix | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/pkgs/development/python-modules/nltk/default.nix b/pkgs/development/python-modules/nltk/default.nix index 56edc44bce71f..9ae4f00b495bb 100644 --- a/pkgs/development/python-modules/nltk/default.nix +++ b/pkgs/development/python-modules/nltk/default.nix @@ -1,17 +1,25 @@ -{ fetchurl, buildPythonPackage, lib, six, pythonAtLeast, pythonOlder }: +{ fetchPypi, buildPythonPackage, lib, six, singledispatch, isPy3k, fetchpatch }: buildPythonPackage rec { - version = "3.2.5"; + version = "3.4"; pname = "nltk"; - src = fetchurl { - url = "mirror://pypi/n/nltk/nltk-${version}.tar.gz"; - sha256 = "2661f9971d983db314bbebd51ba770811a362c6597fd0f303bb1d3beadcb4834"; + src = fetchPypi { + inherit pname version; + extension = "zip"; + sha256 = "286f6797204ffdb52525a1d21ec0a221ec68b8e3fa4f2d25f412ac8e63c70e8d"; }; - propagatedBuildInputs = [ six ]; + propagatedBuildInputs = [ six ] ++ lib.optional (!isPy3k) singledispatch; - disabled = pythonOlder "2.7" || pythonOlder "3.4" && (pythonAtLeast "3.0"); + # TODO: remove patch during update to new version + patches = [ + (fetchpatch { + url = https://github.com/nltk/nltk/commit/3966111cbf2f35fb86082b2f12acd90d75e9b8bb.patch; + includes = [ "setup.py" ]; + sha256 = "1sxafnvf6nzv6d996xc1rys06x62s36swgpfqhsyh6l1lj7y38jw"; + }) + ]; # Tests require some data, the downloading of which is impure. It would # probably make sense to make the data another derivation, but then feeding |