Skip to content

Commit

Permalink
Merge pull request #301263 from loicreynier/gh-f-make-standalone
Browse files Browse the repository at this point in the history
gh-f: package as standalone command
  • Loading branch information
Aleksanaa authored Apr 3, 2024
2 parents e4b3cf2 + fab46df commit 67e2bc0
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions pkgs/by-name/gh/gh-f/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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; {
Expand Down

0 comments on commit 67e2bc0

Please sign in to comment.