Unverified Commit 67e2bc03 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

Merge pull request #301263 from loicreynier/gh-f-make-standalone

gh-f: package as standalone command
parents e4b3cf29 fab46df7
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -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; {