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