-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathflake.nix
46 lines (40 loc) · 1.29 KB
/
flake.nix
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
{
description = "Cardano Blockperf";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs @ {flake-parts, ...}:
with builtins;
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux" "x86_64-darwin"];
perSystem = {
config,
pkgs,
lib,
...
}:
with pkgs.python3Packages; {
packages.blockperf = buildPythonApplication {
pname = "blockperf";
version = let
initFile = readFile ./src/blockperf/__init__.py;
initVersion = head (match ".*__version__ = \"([[:digit:]]\.[[:digit:]]\.[[:digit:]]).*" initFile);
in "${initVersion}-${inputs.self.shortRev or "dirty"}";
pyproject = true;
src = ./.;
propagatedBuildInputs = [
paho-mqtt
prometheus-client
psutil
setuptools
];
meta = with lib; {
description = "Cardano BlockPerf";
homepage = "https://github.com/cardano-foundation/blockperf";
license = licenses.mit;
};
};
};
};
}