depot/third_party/nixpkgs/pkgs/by-name/aw/await/package.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

46 lines
1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
installShellFiles,
}:
stdenv.mkDerivation rec {
pname = "await";
version = "1.0.2";
src = fetchFromGitHub {
owner = "slavaGanzin";
repo = "await";
rev = "v${version}";
hash = "sha256-qvSRuRLZnUptXYknyRn4GgmYtj9BnI8flN6EhadbKMw=";
};
nativeBuildInputs = [ installShellFiles ];
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
installShellCompletion --cmd await autocomplete.{bash,fish,zsh}
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";
};
}