nixpkgs/pkgs/development/python-modules/spacy-alignments/default.nix
Ihar Hrachyshka 567e8dfd8e
treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

51 lines
1 KiB
Nix

{
lib,
stdenv,
cargo,
fetchPypi,
buildPythonPackage,
isPy3k,
rustPlatform,
rustc,
setuptools-rust,
libiconv,
}:
buildPythonPackage rec {
pname = "spacy-alignments";
version = "0.9.0";
format = "setuptools";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
hash = "sha256-jcNYghWR9Xbu97/hAYe8ewa5oMQ4ofNGFwY4cY7/EmM=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit pname version src;
hash = "sha256-0U1ELUMh4YV6M+zrrZGuzvY8SdgyN66F7bJ6sMhOdXs=";
};
nativeBuildInputs = [
setuptools-rust
rustPlatform.cargoSetupHook
cargo
rustc
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
# Fails because spacy_alignments module cannot be loaded correctly.
doCheck = false;
pythonImportsCheck = [ "spacy_alignments" ];
meta = {
description = "Align tokenizations for spaCy and transformers";
homepage = "https://github.com/explosion/spacy-alignments";
license = lib.licenses.mit;
maintainers = [ ];
};
}