about summary refs log tree commit diff
path: root/pkgs/shells/zsh
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-12-13 17:08:40 +0100
committerGitHub <noreply@github.com>2022-12-13 17:08:40 +0100
commit63d3f0fd5d60da4b9038f71e59168e6aa2d58b4f (patch)
tree15b40c1536ba3240545dbd2bb1e7f6751ab02929 /pkgs/shells/zsh
parent126bb19304148f3b6f76c35167932fbcc32648ee (diff)
parentd7c4e4ff63f9f3ee7587d828d50b38d6ce4e639b (diff)
Merge pull request #205148 from deejayem/zsh-forgit-22.12.0
Diffstat (limited to 'pkgs/shells/zsh')
-rw-r--r--pkgs/shells/zsh/zsh-forgit/default.nix21
1 files changed, 16 insertions, 5 deletions
diff --git a/pkgs/shells/zsh/zsh-forgit/default.nix b/pkgs/shells/zsh/zsh-forgit/default.nix
index 01dc6874cc463..ce99b5e34484d 100644
--- a/pkgs/shells/zsh/zsh-forgit/default.nix
+++ b/pkgs/shells/zsh/zsh-forgit/default.nix
@@ -1,28 +1,39 @@
-{ stdenv, lib, fetchFromGitHub, git, fzf }:
+{ stdenv, lib, bash, fetchFromGitHub, makeWrapper, fzf, git }:
 
 stdenv.mkDerivation rec {
   pname = "zsh-forgit";
-  version = "22.11.0";
+  version = "22.12.0";
 
   src = fetchFromGitHub {
     owner = "wfxr";
     repo = "forgit";
     rev = version;
-    sha256 = "ca7EM/F0Spsdr3MbjIVwbjLVXg6/qWGczBQHLCcpU5A=";
+    sha256 = "0juBNUJW4SU3Cl6ouD+xMYzlCJOL7NAYpueZ6V56/ck=";
   };
 
   strictDeps = true;
 
   postPatch = ''
     substituteInPlace forgit.plugin.zsh \
-      --replace "fzf " "${fzf}/bin/fzf " \
-      --replace "git " "${git}/bin/git "
+      --replace "\$INSTALL_DIR/bin/git-forgit" "$out/bin/git-forgit"
+
+    substituteInPlace bin/git-forgit \
+      --replace "/bin/bash" "${bash}/bin/bash"
   '';
 
   dontBuild = true;
 
+  nativeBuildInputs = [ makeWrapper ];
+
   installPhase = ''
+    runHook preInstall
+
+    install -D bin/git-forgit $out/bin/git-forgit
     install -D forgit.plugin.zsh $out/share/zsh/${pname}/forgit.plugin.zsh
+    wrapProgram $out/bin/git-forgit \
+      --prefix PATH : ${lib.makeBinPath [ fzf git ]}
+
+    runHook postInstall
   '';
 
   meta = with lib; {