Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / spacy-alignments / default.nix
blob9bcb74a242fff419c0c042e5aaa164af67ba7859
1 { lib
2 , stdenv
3 , cargo
4 , fetchPypi
5 , buildPythonPackage
6 , isPy3k
7 , rustPlatform
8 , rustc
9 , setuptools-rust
10 , libiconv
13 buildPythonPackage rec {
14   pname = "spacy-alignments";
15   version = "0.9.0";
17   disabled = !isPy3k;
19   src = fetchPypi {
20     inherit pname version;
21     hash = "sha256-jcNYghWR9Xbu97/hAYe8ewa5oMQ4ofNGFwY4cY7/EmM=";
22   };
24   cargoDeps = rustPlatform.fetchCargoTarball {
25     inherit src;
26     name = "${pname}-${version}";
27     hash = "sha256-I5uI+qFyb4/ArpUZi4yS/E/bmwoW7+CalMq02Gnm9S8=";
28   };
30   nativeBuildInputs = [
31     setuptools-rust
32     rustPlatform.cargoSetupHook
33     cargo
34     rustc
35   ];
37   buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
39   # Fails because spacy_alignments module cannot be loaded correctly.
40   doCheck = false;
42   pythonImportsCheck = [ "spacy_alignments" ];
44   meta = with lib; {
45     description = "Align tokenizations for spaCy and transformers";
46     homepage = "https://github.com/explosion/spacy-alignments";
47     license = licenses.mit;
48     maintainers = with maintainers; [ ];
49   };