Merge pull request #205148 from deejayem/zsh-forgit-22.12.0

This commit is contained in:
Sandro 2022-12-13 17:08:40 +01:00 committed by GitHub
commit 63d3f0fd5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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; {