nixpkgs/pkgs/by-name/aw/await/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.0 KiB
Nix
Raw Normal View History

2024-08-01 12:38:51 +00:00
{
lib,
stdenv,
fetchFromGitHub,
2024-08-02 11:42:13 +00:00
installShellFiles,
2024-08-01 12:38:51 +00:00
}:
2024-01-24 12:58:08 +00:00
stdenv.mkDerivation rec {
pname = "await";
2024-08-02 11:42:13 +00:00
version = "1.0.2";
2024-01-24 12:58:08 +00:00
src = fetchFromGitHub {
owner = "slavaGanzin";
repo = "await";
rev = "v${version}";
2024-08-02 11:42:13 +00:00
hash = "sha256-qvSRuRLZnUptXYknyRn4GgmYtj9BnI8flN6EhadbKMw=";
2024-01-24 12:58:08 +00:00
};
2024-08-02 11:42:13 +00:00
nativeBuildInputs = [ installShellFiles ];
2024-01-24 12:58:08 +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-08-02 11:42:13 +00:00
installShellCompletion --cmd await autocomplete.{bash,fish,zsh}
2024-01-24 12:58:08 +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";
};
}