nixpkgs/pkgs/development/python-modules/kernels/default.nix
2026-01-12 15:44:58 +00:00

40 lines
843 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
huggingface-hub,
setuptools,
}:
buildPythonPackage rec {
pname = "kernels";
version = "0.11.7";
pyproject = true;
src = fetchFromGitHub {
owner = "huggingface";
repo = "kernels";
tag = "v${version}";
hash = "sha256-OUOCC7ViRWqRZIUpK31ItWsNc0F87dBpAg/Lql1LWp4=";
};
build-system = [
setuptools
];
dependencies = [
huggingface-hub
];
# Tests require pervasive internet access
doCheck = false;
pythonImportsCheck = [ "kernels" ];
meta = {
description = "Load compute kernels from the Huggingface Hub";
homepage = "https://github.com/huggingface/kernels";
changelog = "https://github.com/huggingface/kernels/releases/tag/${src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ osbm ];
};
}