-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathdefault.nix
More file actions
56 lines (49 loc) · 1.2 KB
/
default.nix
File metadata and controls
56 lines (49 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
lib,
buildPythonPackage,
rustPlatform,
}:
let
version =
(builtins.fromTOML (builtins.readFile ../../../../kernel-abi-check/kernel-abi-check/Cargo.toml))
.package.version;
cargoFlags = [
"-m"
"kernel-abi-check/bindings/python/Cargo.toml"
];
in
buildPythonPackage {
pname = "kernel-abi-check";
inherit version;
format = "pyproject";
src =
let
sourceFiles =
file:
file.name == "Cargo.toml"
|| file.name == "Cargo.lock"
|| file.name == "manylinux-policy.json"
|| file.hasExt "pyi"
|| file.name == "pyproject.toml"
|| file.hasExt "rs"
|| file.name == "stable_abi.toml";
in
import ../../crate-dirs.nix {
inherit lib sourceFiles;
};
cargoDeps = rustPlatform.importCargoLock {
lockFile = ../../../../Cargo.lock;
outputHashes = {
"huggingface-hub-0.0.1" = "sha256-0HjQUEAH/EiG8/1snEWYRteidR+zJq0yct164+6K+IY=";
};
};
maturinBuildFlags = cargoFlags;
#sourceRoot = "source/bindings/python";
build-system = [
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
];
meta = with lib; {
description = "Check ABI compliance of Hugging Face Hub kernels";
};
}