1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-30 17:41:12 +00:00
nixpkgs/pkgs/development/python-modules/spacy/default.nix
2018-07-26 12:43:09 +02:00

77 lines
1.4 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, html5lib
, pytest
, preshed
, ftfy
, numpy
, murmurhash
, plac
, six
, ujson
, dill
, requests
, thinc
, regex
, cymem
, pathlib
, msgpack-python
, msgpack-numpy
}:
buildPythonPackage rec {
pname = "spacy";
version = "2.0.12";
src = fetchPypi {
inherit pname version;
sha256 = "b220ebee412c19613c26b2c1870b60473834bd686cec49553ce5f184164d3359";
};
prePatch = ''
substituteInPlace setup.py \
--replace "html5lib==" "html5lib>=" \
--replace "regex==" "regex>=" \
--replace "ftfy==" "ftfy>=" \
--replace "msgpack-python==" "msgpack-python>=" \
--replace "msgpack-numpy==" "msgpack-numpy>=" \
--replace "pathlib" "pathlib; python_version<\"3.4\""
'';
propagatedBuildInputs = [
numpy
murmurhash
cymem
preshed
thinc
plac
six
html5lib
ujson
dill
requests
regex
ftfy
msgpack-python
msgpack-numpy
] ++ lib.optional (pythonOlder "3.4") pathlib;
checkInputs = [
pytest
];
doCheck = false;
# checkPhase = ''
# ${python.interpreter} -m pytest spacy/tests --vectors --models --slow
# '';
meta = with lib; {
description = "Industrial-strength Natural Language Processing (NLP) with Python and Cython";
homepage = https://github.com/explosion/spaCy;
license = licenses.mit;
maintainers = with maintainers; [ sdll ];
};
}