2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
installShellFiles,
|
|
|
|
}:
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "await";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "1.0.2";
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "slavaGanzin";
|
|
|
|
repo = "await";
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-qvSRuRLZnUptXYknyRn4GgmYtj9BnI8flN6EhadbKMw=";
|
2024-02-07 01:22:34 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
$CC await.c -o await -l pthread
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm755 await -t $out/bin
|
|
|
|
install -Dm444 LICENSE -t $out/share/licenses/await
|
|
|
|
install -Dm444 README.md -t $out/share/doc/await
|
2024-09-19 14:19:46 +00:00
|
|
|
installShellCompletion --cmd await autocomplete.{bash,fish,zsh}
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Small binary that runs a list of commands in parallel and awaits termination";
|
|
|
|
homepage = "https://await-cli.app";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ chewblacka ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
mainProgram = "await";
|
|
|
|
};
|
|
|
|
}
|