diff options
author | Soispha <soispha@vhack.eu> | 2023-12-31 12:13:01 +0100 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-12-31 12:13:01 +0100 |
commit | 1b744b912d783c40ddc4d6cafb2e7dd7cd692386 (patch) | |
tree | 506839cff4b16ad5f366908ff943b7ee2f776a4d /hm/soispha/conf | |
parent | feat(hm/pkgs/lock): Init (diff) | |
download | nixos-config-1b744b912d783c40ddc4d6cafb2e7dd7cd692386.zip |
fix(hm/conf/task/hooks/): Correctly wrap python hooks to add timewarrior
Diffstat (limited to 'hm/soispha/conf')
-rw-r--r-- | hm/soispha/conf/taskwarrior/hooks/default.nix | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/hm/soispha/conf/taskwarrior/hooks/default.nix b/hm/soispha/conf/taskwarrior/hooks/default.nix index a8ce09cc..429db108 100644 --- a/hm/soispha/conf/taskwarrior/hooks/default.nix +++ b/hm/soispha/conf/taskwarrior/hooks/default.nix @@ -42,7 +42,10 @@ }; track_timewarrior = pkgs.stdenv.mkDerivation { name = "track_timewarrior.taskwarrior-hook"; - propagatedBuildInputs = [ + nativeBuildInputs = [ + pkgs.makeWrapper + ]; + buildInputs = [ pkgs.timewarrior pkgs.taskwarrior (pkgs.python3.withPackages (pythonPackages: @@ -52,10 +55,17 @@ ]; dontUnpack = true; installPhase = "install -Dm755 ${./scripts/on-modify_track-timewarrior.py} $out/bin/bin"; + postInstall = '' + wrapProgram $out/bin/bin \ + --prefix PATH : ${lib.makeBinPath [pkgs.taskwarrior pkgs.timewarrior]} + ''; }; track_total_active_time = pkgs.stdenv.mkDerivation { name = "track_total_active_time.taskwarrior-hook"; - propagatedBuildInputs = [ + nativeBuildInputs = [ + pkgs.makeWrapper + ]; + buildInputs = [ pkgs.taskwarrior (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [ @@ -64,6 +74,10 @@ ]; dontUnpack = true; installPhase = "install -Dm755 ${./scripts/on-modify_track-total-active-time.py} $out/bin/bin"; + postInstall = '' + wrapProgram $out/bin/bin \ + --prefix PATH : ${lib.makeBinPath [pkgs.taskwarrior]} + ''; }; mkSyncGitRepo = type: { |