Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 86 lines 1.3 kB view raw
1{ stdenv 2, lib 3, buildPythonPackage 4, fetchPypi 5, pythonOlder 6, pytest 7, cython 8, cymem 9, darwin 10, msgpack-numpy 11, msgpack 12, preshed 13, numpy 14, murmurhash 15, pathlib 16, hypothesis 17, tqdm 18, cytoolz 19, plac 20, six 21, mock 22, wrapt 23, dill 24, blis 25, srsly 26, wasabi 27}: 28 29buildPythonPackage rec { 30 pname = "thinc"; 31 version = "7.0.8"; 32 33 src = fetchPypi { 34 inherit pname version; 35 sha256 = "191admjvhqsbxpqn73q42i0i8kvlblj0k6p0z9p7n3pcxzl75nsw"; 36 }; 37 38 buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ 39 Accelerate CoreFoundation CoreGraphics CoreVideo 40 ]); 41 42 propagatedBuildInputs = [ 43 blis 44 cython 45 cymem 46 msgpack-numpy 47 msgpack 48 preshed 49 numpy 50 murmurhash 51 tqdm 52 cytoolz 53 plac 54 six 55 srsly 56 wrapt 57 dill 58 wasabi 59 ] ++ lib.optional (pythonOlder "3.4") pathlib; 60 61 62 checkInputs = [ 63 hypothesis 64 mock 65 pytest 66 ]; 67 68 prePatch = '' 69 substituteInPlace setup.py \ 70 --replace "plac>=0.9.6,<1.0.0" "plac>=0.9.6" 71 ''; 72 73 # Cannot find cython modules. 74 doCheck = false; 75 76 checkPhase = '' 77 pytest thinc/tests 78 ''; 79 80 meta = with stdenv.lib; { 81 description = "Practical Machine Learning for NLP in Python"; 82 homepage = https://github.com/explosion/thinc; 83 license = licenses.mit; 84 maintainers = with maintainers; [ aborsu danieldk sdll ]; 85 }; 86}