diff options
Diffstat (limited to 'overlays/inwx-cdnskey/default.nix')
-rw-r--r-- | overlays/inwx-cdnskey/default.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/overlays/inwx-cdnskey/default.nix b/overlays/inwx-cdnskey/default.nix new file mode 100644 index 00000000..c19c2df5 --- /dev/null +++ b/overlays/inwx-cdnskey/default.nix | |||
@@ -0,0 +1,28 @@ | |||
1 | final: prev: | ||
2 | let | ||
3 | packageOverrides = final.callPackage ./python-packages.nix {}; | ||
4 | inpPython = final.python39.override { inherit packageOverrides; }; | ||
5 | in { | ||
6 | inwx-cdnskey = prev.stdenv.mkDerivation rec { | ||
7 | name = "inwx-cdnskey"; | ||
8 | src = ./inwx-cdnskey.py; | ||
9 | |||
10 | phases = [ "buildPhase" "checkPhase" "installPhase" ]; | ||
11 | |||
12 | python = inpPython.withPackages (ps: with ps; [pyxdg inwx-domrobot configparser dnspython]); | ||
13 | |||
14 | buildPhase = '' | ||
15 | substituteAll $src inwx-cdnskey | ||
16 | ''; | ||
17 | |||
18 | doCheck = true; | ||
19 | checkPhase = '' | ||
20 | ${python}/bin/python -m py_compile inwx-cdnskey | ||
21 | ''; | ||
22 | |||
23 | installPhase = '' | ||
24 | install -m 0755 -D -t $out/bin \ | ||
25 | inwx-cdnskey | ||
26 | ''; | ||
27 | }; | ||
28 | } | ||