summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2019-12-17 00:17:57 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2019-12-17 00:17:57 +0100
commit33b4e0eb74fee27d8edacb581fd6eeb10cce9f4f (patch)
tree0f9aba6b4b880292a427ea48b8c39859f377953c /nix
parent61e8781e600a916e51fd663c4d8cd5d93bb894cb (diff)
downloadutils-33b4e0eb74fee27d8edacb581fd6eeb10cce9f4f.tar
utils-33b4e0eb74fee27d8edacb581fd6eeb10cce9f4f.tar.gz
utils-33b4e0eb74fee27d8edacb581fd6eeb10cce9f4f.tar.bz2
utils-33b4e0eb74fee27d8edacb581fd6eeb10cce9f4f.tar.xz
utils-33b4e0eb74fee27d8edacb581fd6eeb10cce9f4f.zip
worktime
Diffstat (limited to 'nix')
-rw-r--r--nix/default.nix1
-rw-r--r--nix/worktime.nix22
2 files changed, 23 insertions, 0 deletions
diff --git a/nix/default.nix b/nix/default.nix
index f3e35e2..097d092 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -9,4 +9,5 @@ self: super:
9 recv = self.callPackage ./recv.nix {}; 9 recv = self.callPackage ./recv.nix {};
10 notmuch-tcp = self.callPackage ./notmuch-tcp.nix {}; 10 notmuch-tcp = self.callPackage ./notmuch-tcp.nix {};
11 persistent-nix-shell = self.callPackage ./persistent-nix-shell.nix {}; 11 persistent-nix-shell = self.callPackage ./persistent-nix-shell.nix {};
12 worktime = self.callPackage ./worktime.nix {};
12} 13}
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}