-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathopsqueue_python.nix
More file actions
71 lines (63 loc) · 1.3 KB
/
opsqueue_python.nix
File metadata and controls
71 lines (63 loc) · 1.3 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
lib,
buildPythonPackage,
rustPlatform,
perl,
git,
# Python packages:
cbor2,
opentelemetry-api,
opentelemetry-exporter-otlp,
opentelemetry-sdk,
opnieuw,
psutil,
}:
let
root = ../../.;
util = import (root + /nix/util.nix) { inherit lib; };
in
buildPythonPackage rec {
pname = "opsqueue";
version = "0.1.0";
pyproject = true;
src = util.fileFilter {
name = "opsqueue_python";
src = root;
# We're copying slightly too much to the Nix store here,
# but using the more granular file filter was very error-prone.
# This is one thing that could be improved a little in the future.
srcGlobalWhitelist = [
".py"
".pyi"
"py.typed"
".rs"
".toml"
".lock"
".db"
".md"
];
};
cargoDeps = rustPlatform.importCargoLock { lockFile = ../../Cargo.lock; };
env = {
DATABASE_URL = "sqlite://./opsqueue/opsqueue_example_database_schema.db";
};
pythonImportsCheck = [ pname ];
maturinBuildFlags = [
"--manifest-path"
"./libs/opsqueue_python/Cargo.toml"
];
nativeBuildInputs = with rustPlatform; [
perl
git
cargoSetupHook
maturinBuildHook
];
propagatedBuildInputs = [
cbor2
opentelemetry-api
opentelemetry-exporter-otlp
opentelemetry-sdk
opnieuw
psutil
];
}