From 7e7656e22ced47bec5ea5bae1da08e3ef48d2e42 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 4 Apr 2023 10:23:20 +0200 Subject: worktime... --- overlays/worktime/default.nix | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) (limited to 'overlays/worktime/default.nix') 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 @@ -{ prev, ... }: { - worktime = prev.stdenv.mkDerivation rec { - name = "worktime"; - src = ./worktime.py; +{ prev, ... }: - phases = [ "buildPhase" "checkPhase" "installPhase" ]; +with prev.poetry2nix; - python = prev.python39.withPackages (ps: with ps; [pyxdg python-dateutil uritools requests configparser tabulate backoff]); - buildInputs = [ python ]; +{ + worktime = mkPoetryApplication { + python = prev.python310; - buildPhase = '' - substituteAll $src worktime - ''; + projectDir = cleanPythonSources { src = ./.; }; - doCheck = true; - checkPhase = '' - python -m py_compile worktime - ''; - - installPhase = '' - install -m 0755 -D -t $out/bin \ - worktime - ''; + overrides = overrides.withDefaults (self: super: { + inherit (prev.python310.pkgs) tabulate; + }); }; } -- cgit v1.2.3