summaryrefslogtreecommitdiff
path: root/overlays/smartprom/default.nix
blob: 807f3f84d6946a134a4ace973ffa58abe85b1e82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ final, prev, flakeInputs, sources, ... }:
let
  inherit (prev.stdenv.targetPlatform) system;
in {
  smartprom = flakeInputs.mach-nix.lib.${system}.buildPythonPackage rec {
    inherit (sources.smartprom) src pname version;
    ignoreDataOutdated = true;

    prePatch = ''
      mkdir smartprom
      mv smartprom.py smartprom/__main__.py
      echo >> smartprom/__init__.py

      substituteAll ${./setup.py} ./setup.py
    '';

    requirements = ''
      prometheus_client
    '';
  };
}