1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 huggingface-hub,
6 setuptools,
7}:
8buildPythonPackage rec {
9 pname = "kernels";
10 version = "0.10.2";
11 pyproject = true;
12
13 src = fetchFromGitHub {
14 owner = "huggingface";
15 repo = "kernels";
16 tag = "v${version}";
17 hash = "sha256-bOUX/TuuVbOyDWJMrc6K7AqU31oQY6wYe0KCLQvnISI=";
18 };
19
20 build-system = [
21 setuptools
22 ];
23
24 dependencies = [
25 huggingface-hub
26 ];
27
28 # Tests require pervasive internet access
29 doCheck = false;
30
31 pythonImportsCheck = [ "kernels" ];
32
33 meta = {
34 description = "Load compute kernels from the Huggingface Hub";
35 homepage = "https://github.com/huggingface/kernels";
36 changelog = "https://github.com/huggingface/kernels/releases/tag/${src.tag}";
37 license = lib.licenses.asl20;
38 maintainers = with lib.maintainers; [ osbm ];
39 };
40}