summaryrefslogtreecommitdiff
path: root/overlays/worktime/default.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2023-04-04 10:23:20 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2023-04-04 10:23:20 +0200
commit7e7656e22ced47bec5ea5bae1da08e3ef48d2e42 (patch)
treea4a1d4abda4092d69866dbaf6d281c93150f266f /overlays/worktime/default.nix
parent47f8d03ecb9efe39045630a1ebdcbc1c5a8f424e (diff)
downloadnixos-7e7656e22ced47bec5ea5bae1da08e3ef48d2e42.tar
nixos-7e7656e22ced47bec5ea5bae1da08e3ef48d2e42.tar.gz
nixos-7e7656e22ced47bec5ea5bae1da08e3ef48d2e42.tar.bz2
nixos-7e7656e22ced47bec5ea5bae1da08e3ef48d2e42.tar.xz
nixos-7e7656e22ced47bec5ea5bae1da08e3ef48d2e42.zip
worktime...
Diffstat (limited to 'overlays/worktime/default.nix')
-rw-r--r--overlays/worktime/default.nix28
1 files changed, 9 insertions, 19 deletions
diff --git a/overlays/worktime/default.nix b/overlays/worktime/default.nix
index 699e00c0..7f5865ee 100644
--- a/overlays/worktime/default.nix
+++ b/overlays/worktime/default.nix
@@ -1,25 +1,15 @@
1{ prev, ... }: { 1{ prev, ... }:
2 worktime = prev.stdenv.mkDerivation rec {
3 name = "worktime";
4 src = ./worktime.py;
5 2
6 phases = [ "buildPhase" "checkPhase" "installPhase" ]; 3with prev.poetry2nix;
7 4
8 python = prev.python39.withPackages (ps: with ps; [pyxdg python-dateutil uritools requests configparser tabulate backoff]); 5{
9 buildInputs = [ python ]; 6 worktime = mkPoetryApplication {
7 python = prev.python310;
10 8
11 buildPhase = '' 9 projectDir = cleanPythonSources { src = ./.; };
12 substituteAll $src worktime
13 '';
14 10
15 doCheck = true; 11 overrides = overrides.withDefaults (self: super: {
16 checkPhase = '' 12 inherit (prev.python310.pkgs) tabulate;
17 python -m py_compile worktime 13 });
18 '';
19
20 installPhase = ''
21 install -m 0755 -D -t $out/bin \
22 worktime
23 '';
24 }; 14 };
25} 15}