From fab46df7639328c77c575e55bf18a5c54374d4a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Reynier?= Date: Wed, 3 Apr 2024 15:05:00 +0000 Subject: [PATCH] gh-f: package as standalone command --- pkgs/by-name/gh/gh-f/package.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/gh/gh-f/package.nix b/pkgs/by-name/gh/gh-f/package.nix index 8fb4fa57d9b9..6b10219f8a81 100644 --- a/pkgs/by-name/gh/gh-f/package.nix +++ b/pkgs/by-name/gh/gh-f/package.nix @@ -2,11 +2,24 @@ , fetchFromGitHub , stdenvNoCC , makeWrapper +, gh , fzf , coreutils +, gawk +, gnused +, withBat ? false , bat }: - +let + binPath = lib.makeBinPath ([ + gh + fzf + coreutils + gawk + gnused + ] + ++ lib.optional withBat bat); +in stdenvNoCC.mkDerivation rec { pname = "gh-f"; version = "1.1.5"; @@ -27,7 +40,7 @@ stdenvNoCC.mkDerivation rec { ''; postFixup = '' - wrapProgram "$out/bin/gh-f" --prefix PATH : "${lib.makeBinPath [fzf bat coreutils]}" + wrapProgram "$out/bin/gh-f" --prefix PATH : "${binPath}" ''; meta = with lib; {