{ lib , callPackage , fetchPypi , buildPythonPackage , dataclasses , pytorch , pythonOlder , spacy , spacy-alignments , srsly , transformers }: buildPythonPackage rec { pname = "spacy-transformers"; version = "1.1.5"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; hash = "sha256-nxbmnFyHptbe5M7rQi2ECGoBpxUuutdCtY20eHsGDPI="; }; propagatedBuildInputs = [ pytorch spacy spacy-alignments srsly transformers ] ++ lib.optionals (pythonOlder "3.7") [ dataclasses ]; # Test fails due to missing arguments for trfs2arrays(). doCheck = false; pythonImportsCheck = [ "spacy_transformers" ]; passthru.tests.annotation = callPackage ./annotation-test { }; meta = with lib; { description = "spaCy pipelines for pretrained BERT, XLNet and GPT-2"; homepage = "https://github.com/explosion/spacy-transformers"; license = licenses.mit; maintainers = with maintainers; [ ]; }; }