pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / by-name / aw / await / package.nix
blob8369cd6015aedf60ba468b6cb6dcf94308248b92
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   installShellFiles,
6   versionCheckHook,
7 }:
9 stdenv.mkDerivation rec {
10   pname = "await";
11   version = "1.0.5";
13   src = fetchFromGitHub {
14     owner = "slavaGanzin";
15     repo = "await";
16     rev = "v${version}";
17     hash = "sha256-0U9eLQDvHnRUJt46AI4bDWZfGynqjaWs9teidWP3RsA=";
18   };
20   nativeBuildInputs = [ installShellFiles ];
22   buildPhase = ''
23     runHook preBuild
24     $CC await.c -o await -l pthread
25     runHook postBuild
26   '';
28   installPhase = ''
29     runHook preInstall
31     install -Dm755 await -t $out/bin
32     install -Dm444 LICENSE -t $out/share/licenses/await
33     install -Dm444 README.md -t $out/share/doc/await
34     installShellCompletion --cmd await autocompletions/await.{bash,fish,zsh}
36     runHook postInstall
37   '';
39   nativeInstallCheckInputs = [
40     versionCheckHook
41   ];
42   doInstallCheck = true;
44   meta = with lib; {
45     description = "Small binary that runs a list of commands in parallel and awaits termination";
46     homepage = "https://await-cli.app";
47     license = licenses.mit;
48     maintainers = with maintainers; [ chewblacka ];
49     platforms = platforms.all;
50     mainProgram = "await";
51   };