Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374{ lib, stdenv, buildPythonPackage, fetchFromGitHub,
# build-system setuptools,
# dependencies huggingface-hub, onnxruntime, sentencepiece, torch, tqdm, transformers,}:
buildPythonPackage (finalAttrs: { pname = "gliner"; version = "0.2.29"; pyproject = true; __structuredAttrs = true;
src = fetchFromGitHub { owner = "urchade"; repo = "GLiNER"; tag = "v${finalAttrs.version}"; hash = "sha256-Y/oj8iP9IOyWxDYX61fSVUReiOXL8jDxKrXF9n9700I="; };
build-system = [ setuptools ];
pythonRelaxDeps = [ "transformers" ]; dependencies = [ huggingface-hub onnxruntime sentencepiece torch tqdm transformers ];
# aarch64-linux fails cpuinfo test, because /sys/devices/system/cpu/ does not exist in the sandbox: # terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException' # # -> Skip the import check pythonImportsCheck = lib.optionals (!(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64)) [ "gliner" ];
# All tests require internet doCheck = false;
meta = { description = "Generalist and Lightweight Model for Named Entity Recognition"; homepage = "https://github.com/urchade/GLiNER"; changelog = "https://github.com/urchade/GLiNER/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ GaetanLepage ]; badPlatforms = [ # terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException' # Attempt to use DefaultLogger but none has been registered. # "aarch64-linux" ]; };})