mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
{ stdenv
|
|
, lib
|
|
, bash
|
|
, coreutils
|
|
, findutils
|
|
, fetchFromGitHub
|
|
, fzf
|
|
, git
|
|
, gnugrep
|
|
, gnused
|
|
, makeWrapper
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "zsh-forgit";
|
|
version = "24.02.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "wfxr";
|
|
repo = "forgit";
|
|
rev = version;
|
|
sha256 = "sha256-DoOtrnEJwSxkCZtsVek+3w9RZH7j7LTvdleBC88xyfI=";
|
|
};
|
|
|
|
strictDeps = true;
|
|
|
|
postPatch = ''
|
|
substituteInPlace forgit.plugin.zsh \
|
|
--replace "\$INSTALL_DIR/bin/git-forgit" "$out/bin/git-forgit"
|
|
'';
|
|
|
|
dontBuild = true;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -D bin/git-forgit $out/bin/git-forgit
|
|
install -D completions/_git-forgit $out/share/zsh/site-functions/_git-forgit
|
|
install -D completions/git-forgit.zsh $out/share/zsh/${pname}/git-forgit.zsh
|
|
install -D forgit.plugin.zsh $out/share/zsh/${pname}/forgit.plugin.zsh
|
|
wrapProgram $out/bin/git-forgit \
|
|
--prefix PATH : ${lib.makeBinPath [ bash coreutils findutils fzf git gnugrep gnused ]}
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/wfxr/forgit";
|
|
description = "Utility tool powered by fzf for using git interactively";
|
|
mainProgram = "git-forgit";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ deejayem ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|