41 lines
843 B
Nix
41 lines
843 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
huggingface-hub,
|
|
setuptools,
|
|
}:
|
|
buildPythonPackage rec {
|
|
pname = "kernels";
|
|
version = "0.10.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "huggingface";
|
|
repo = "kernels";
|
|
tag = "v${version}";
|
|
hash = "sha256-bOUX/TuuVbOyDWJMrc6K7AqU31oQY6wYe0KCLQvnISI=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|