From b4f96d2b981a92a2d2699842adcfa9e758cad12e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Reynier?= Date: Tue, 2 Apr 2024 14:02:54 +0000 Subject: [PATCH] gh-f: init at 1.1.5 Co-authored-by: Aleksana --- pkgs/by-name/gh/gh-f/package.nix | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 pkgs/by-name/gh/gh-f/package.nix diff --git a/pkgs/by-name/gh/gh-f/package.nix b/pkgs/by-name/gh/gh-f/package.nix new file mode 100644 index 000000000000..8fb4fa57d9b9 --- /dev/null +++ b/pkgs/by-name/gh/gh-f/package.nix @@ -0,0 +1,41 @@ +{ lib +, fetchFromGitHub +, stdenvNoCC +, makeWrapper +, fzf +, coreutils +, bat +}: + +stdenvNoCC.mkDerivation rec { + pname = "gh-f"; + version = "1.1.5"; + + src = fetchFromGitHub { + owner = "gennaro-tedesco"; + repo = "gh-f"; + rev = "v${version}"; + hash = "sha256-ITl8T8Oe21m047ygFlxWVjzUYPG4rlcTjfSpsropYJw="; + }; + + nativeBuildInputs = [ + makeWrapper + ]; + + installPhase = '' + install -D -m755 "gh-f" "$out/bin/gh-f" + ''; + + postFixup = '' + wrapProgram "$out/bin/gh-f" --prefix PATH : "${lib.makeBinPath [fzf bat coreutils]}" + ''; + + meta = with lib; { + homepage = "https://github.com/gennaro-tedesco/gh-f"; + description = "GitHub CLI ultimate FZF extension"; + maintainers = with maintainers; [ loicreynier ]; + license = licenses.unlicense; + mainProgram = "gh-f"; + platforms = platforms.all; + }; +}