summaryrefslogtreecommitdiff
path: root/overlays/worktime/default.nix
blob: 26e1dfedca4b44bf295a72beb44958e34f0abdc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
final: prev: {
  worktime = prev.stdenv.mkDerivation rec {
    name = "worktime";
    src = ./worktime.py;

    phases = [ "buildPhase" "installPhase" ];

    python = prev.python37.withPackages (ps: with ps; [pyxdg dateutil uritools requests configparser]);

    buildPhase = ''
      substituteAll $src worktime
    '';

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