-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathdefault.nix
More file actions
52 lines (46 loc) · 1.06 KB
/
default.nix
File metadata and controls
52 lines (46 loc) · 1.06 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
{
lib,
buildPythonPackage,
rustPlatform,
}:
let
version =
(builtins.fromTOML (builtins.readFile ../../../../kernels-data/Cargo.toml)).package.version;
cargoFlags = [
"-m"
"kernels-data/bindings/python/Cargo.toml"
];
in
buildPythonPackage {
pname = "kernels-data";
inherit version;
format = "pyproject";
src =
let
sourceFiles =
file:
file.name == "Cargo.toml"
|| file.name == "Cargo.lock"
|| file.hasExt "pyi"
|| file.name == "pyproject.toml"
|| file.name == "python_dependencies.json"
|| file.hasExt "rs";
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;
build-system = [
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
];
meta = with lib; {
description = "Kernels data structures";
};
}