-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathdefault.nix
More file actions
53 lines (46 loc) · 1.09 KB
/
default.nix
File metadata and controls
53 lines (46 loc) · 1.09 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
{
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;
};
maturinBuildFlags = cargoFlags;
#sourceRoot = "source/bindings/python";
build-system = [
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
];
meta = with lib; {
description = "Check ABI compliance of Hugging Face Hub kernels";
};
}