about summary refs log tree commit diff
path: root/tools/dnsmasq-leases-html/default.nix
blob: 4848ea75fd9f53fb8e55812e0db2e10ba5347740 (plain) (blame)
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
29
30
31
32
33
34
35
36
{ self, lib, stdenvNoCC, pkgs }:

stdenvNoCC.mkDerivation rec {
  pname = "dnsmasq-leases-html";
  src = ./dnsmasq-leases-html.py;
  templates = ./templates;
  version = "0.1.0";

  buildInputs = [
    (pkgs.python310.withPackages (ps: with ps; [
      jinja2
    ]))
  ];

  propagatedBuildInputs = [
    (pkgs.python310.withPackages (ps: with ps; [
      jinja2
    ]))
  ];

  dontUnpack = true;
  dontBuild = true;

  installPhase = ''
    mkdir -p $out/bin
    cp $src $out/bin/${pname}
    cp -r $templates $out/bin/templates
  '';

  meta = with pkgs.lib; {
    description = "CLI to generate a HTML page with dnsmasq leases.";
    license = licenses.mit;
    platforms = platforms.unix;
    maintainers = [ ];
  };
}