Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, cargo 4, fetchPypi 5, fetchpatch 6, buildPythonPackage 7, isPy3k 8, rustPlatform 9, rustc 10, setuptools-rust 11, libiconv 12}: 13 14buildPythonPackage rec { 15 pname = "spacy-alignments"; 16 version = "0.8.4"; 17 18 disabled = !isPy3k; 19 20 src = fetchPypi { 21 inherit pname version; 22 hash = "sha256-1HApl/RZ0w5Tf2OPu1QBUa36uIqilp+dDbPjujn0e9s="; 23 }; 24 25 cargoDeps = rustPlatform.fetchCargoTarball { 26 inherit src; 27 name = "${pname}-${version}"; 28 hash = "sha256-oFSruBnoodv6/0/OrmJ/2SVoWm3u3FGtzVJ9xgp0+Cg="; 29 }; 30 31 nativeBuildInputs = [ 32 setuptools-rust 33 rustPlatform.cargoSetupHook 34 cargo 35 rustc 36 ]; 37 38 buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; 39 40 # Fails because spacy_alignments module cannot be loaded correctly. 41 doCheck = false; 42 43 pythonImportsCheck = [ "spacy_alignments" ]; 44 45 meta = with lib; { 46 description = "Align tokenizations for spaCy and transformers"; 47 homepage = "https://github.com/explosion/spacy-alignments"; 48 license = licenses.mit; 49 maintainers = with maintainers; [ ]; 50 }; 51}