summaryrefslogtreecommitdiff
path: root/overlays/inwx-cdnskey/default.nix
blob: cd564f24237866a36147ad1dddf8602a166e1e8e (plain)
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
{ final, prev, ... }:
let
  packageOverrides = final.callPackage ./python-packages.nix {};
  inpPython = final.python39.override { inherit packageOverrides; };
in {
  inwx-cdnskey = prev.stdenv.mkDerivation rec {
    name = "inwx-cdnskey";
    src = ./inwx-cdnskey.py;

    phases = [ "buildPhase" "checkPhase" "installPhase" ];

    python = inpPython.withPackages (ps: with ps; [pyxdg inwx-domrobot configparser dnspython]);

    buildPhase = ''
      substituteAll $src inwx-cdnskey
    '';

    doCheck = true;
    checkPhase = ''
      ${python}/bin/python -m py_compile inwx-cdnskey
    '';

    installPhase = ''
      install -m 0755 -D -t $out/bin \
        inwx-cdnskey
    '';
  };
}