summaryrefslogtreecommitdiff
path: root/overlays/cake-prometheus-exporter/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'overlays/cake-prometheus-exporter/default.nix')
-rw-r--r--overlays/cake-prometheus-exporter/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/overlays/cake-prometheus-exporter/default.nix b/overlays/cake-prometheus-exporter/default.nix
new file mode 100644
index 00000000..3d0acc2d
--- /dev/null
+++ b/overlays/cake-prometheus-exporter/default.nix
@@ -0,0 +1,29 @@
1{ final, prev, ... }:
2let
3 inpPython = final.python310.override {};
4in {
5 cake-prometheus-exporter = prev.stdenv.mkDerivation rec {
6 pname = "cake-prometheus-exporter";
7 version = "0.0.0";
8
9 src = ./cake-prometheus-exporter.py;
10
11 phases = [ "buildPhase" "checkPhase" "installPhase" ];
12
13 python = inpPython.withPackages (ps: with ps; []);
14
15 buildPhase = ''
16 substituteAll $src cake-prometheus-exporter
17 '';
18
19 doCheck = true;
20 checkPhase = ''
21 ${python}/bin/python -m py_compile cake-prometheus-exporter
22 '';
23
24 installPhase = ''
25 install -m 0755 -D -t $out/bin \
26 cake-prometheus-exporter
27 '';
28 };
29}