summaryrefslogtreecommitdiff
path: root/overlays/worktime/default.nix
diff options
context:
space:
mode:
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}