summaryrefslogtreecommitdiff
path: root/nix/worktime.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/worktime.nix')
-rw-r--r--nix/worktime.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/nix/worktime.nix b/nix/worktime.nix
new file mode 100644
index 0000000..ddab8b2
--- /dev/null
+++ b/nix/worktime.nix
@@ -0,0 +1,22 @@
1{ stdenv
2, python37
3}:
4
5stdenv.mkDerivation rec {
6 pname = "worktime";
7 version = "3";
8 src = ../worktime.py;
9
10 phases = [ "buildPhase" "installPhase" ];
11
12 python = python37.withPackages (ps: with ps; [pyxdg dateutil uritools requests configparser]);
13
14 buildPhase = ''
15 substituteAll $src worktime
16 '';
17
18 installPhase = ''
19 install -m 0755 -D -t $out/bin \
20 worktime
21 '';
22}