summaryrefslogtreecommitdiff
path: root/overlays/cake-prometheus-exporter/default.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2023-03-11 12:42:44 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2023-03-11 12:42:44 +0100
commit4879d0f3fbdd245290b7d1394862b0c15561da6b (patch)
tree0f33c337ed629aaaf4028bfe59393b9f2103c93b /overlays/cake-prometheus-exporter/default.nix
parent4242ccee399a3204b656025afee5390c09925e94 (diff)
downloadnixos-4879d0f3fbdd245290b7d1394862b0c15561da6b.tar
nixos-4879d0f3fbdd245290b7d1394862b0c15561da6b.tar.gz
nixos-4879d0f3fbdd245290b7d1394862b0c15561da6b.tar.bz2
nixos-4879d0f3fbdd245290b7d1394862b0c15561da6b.tar.xz
nixos-4879d0f3fbdd245290b7d1394862b0c15561da6b.zip
cake-prometheus-exporter
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}