Merge pull request #290044 from justinas/git-radar-coreutils-darwin

git-radar: add coreutils-prefixed to PATH on darwin
This commit is contained in:
Sebastián Mancilla 2024-08-18 23:43:03 -04:00 committed by GitHub
commit 77aff3d3bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,4 @@
{lib, stdenv, fetchFromGitHub}:
{ coreutils-prefixed, lib, makeWrapper, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "git-radar";
@ -11,12 +11,17 @@ stdenv.mkDerivation rec {
sha256 = "0c3zp8s4w7m4s71qgwk1jyfc8yzw34f2hi43x1w437ypgabwg81j";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
cp git-radar fetch.sh prompt.bash prompt.zsh radar-base.sh $out
ln -s $out/git-radar $out/bin
${lib.optionalString stdenv.isDarwin ''
wrapProgram $out/git-radar --prefix PATH : ${lib.makeBinPath [ coreutils-prefixed ]}
''}
'';
meta = with lib; {