Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 42 lines 860 B view raw
1{ lib 2, callPackage 3, fetchPypi 4, buildPythonPackage 5, pytorch 6, spacy 7, spacy-alignments 8, srsly 9, transformers 10}: 11 12buildPythonPackage rec { 13 pname = "spacy-transformers"; 14 version = "1.0.2"; 15 16 src = fetchPypi { 17 inherit pname version; 18 hash = "sha256-AYshH2trMTgeSkAPRb6wRWpm4gA5FaKV2NJd+PhzAy4="; 19 }; 20 21 propagatedBuildInputs = [ 22 pytorch 23 spacy 24 spacy-alignments 25 srsly 26 transformers 27 ]; 28 29 # Test fails due to missing arguments for trfs2arrays(). 30 doCheck = false; 31 32 pythonImportsCheck = [ "spacy_transformers" ]; 33 34 passthru.tests.annotation = callPackage ./annotation-test { }; 35 36 meta = with lib; { 37 description = "spaCy pipelines for pretrained BERT, XLNet and GPT-2"; 38 homepage = "https://github.com/explosion/spacy-transformers"; 39 license = licenses.mit; 40 maintainers = with maintainers; [ danieldk ]; 41 }; 42}