gh-f: cleanup (#434673)

This commit is contained in:
dish
2025-08-18 16:48:37 -04:00
committed by GitHub
+31 -24
View File
@@ -2,7 +2,7 @@
lib,
fetchFromGitHub,
stdenvNoCC,
makeWrapper,
makeBinaryWrapper,
gh,
fzf,
coreutils,
@@ -10,48 +10,55 @@
gnused,
withBat ? false,
bat,
nix-update-script,
}:
let
binPath = lib.makeBinPath (
[
gh
fzf
coreutils
gawk
gnused
]
++ lib.optional withBat bat
);
in
stdenvNoCC.mkDerivation rec {
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "gh-f";
version = "1.4.1";
src = fetchFromGitHub {
owner = "gennaro-tedesco";
repo = "gh-f";
rev = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-Jf7sDn/iRB/Lwz21fGLRduvt9/9cs5FFMhazULgj1ik=";
};
nativeBuildInputs = [
makeWrapper
];
nativeBuildInputs = [ makeBinaryWrapper ];
propagatedUserEnvPkgs = [
gh
fzf
coreutils
gawk
gnused
]
++ lib.optional withBat bat;
installPhase = ''
runHook preInstall
install -D -m755 "gh-f" "$out/bin/gh-f"
runHook postInstall
'';
postFixup = ''
wrapProgram "$out/bin/gh-f" --prefix PATH : "${binPath}"
wrapProgram "$out/bin/gh-f" \
--suffix PATH : ${lib.makeBinPath finalAttrs.propagatedUserEnvPkgs}
'';
meta = with lib; {
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/gennaro-tedesco/gh-f";
description = "GitHub CLI ultimate FZF extension";
maintainers = with maintainers; [ loicreynier ];
license = licenses.unlicense;
license = lib.licenses.unlicense;
mainProgram = "gh-f";
platforms = platforms.all;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [
loicreynier
yiyu
];
};
}
})