about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAleksana <me@aleksana.moe>2024-04-03 23:46:03 +0800
committerGitHub <noreply@github.com>2024-04-03 23:46:03 +0800
commit67e2bc037137e4fdcf6b3132a4f54c165726500b (patch)
treeff218fca303630a274bc4edaaf0d74494c5dce3a /pkgs
parente4b3cf2940a1a3dbcd6cc30c761ecfdca6e15dd6 (diff)
parentfab46df7639328c77c575e55bf18a5c54374d4a0 (diff)
Merge pull request #301263 from loicreynier/gh-f-make-standalone
gh-f: package as standalone command
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/by-name/gh/gh-f/package.nix17
1 files 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 8fb4fa57d9b99..6b10219f8a81e 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; {