From d7c4e4ff63f9f3ee7587d828d50b38d6ce4e639b Mon Sep 17 00:00:00 2001 From: David Morgan Date: Thu, 8 Dec 2022 13:32:03 +0000 Subject: [PATCH] zsh-forgit: 22.11.0 -> 22.12.0 --- pkgs/shells/zsh/zsh-forgit/default.nix | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/pkgs/shells/zsh/zsh-forgit/default.nix b/pkgs/shells/zsh/zsh-forgit/default.nix index 01dc6874cc46..ce99b5e34484 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; {