From 76df2498bb3eaca5cd1ed55067ccbdf798abebb2 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 27 Nov 2024 09:22:56 +0200 Subject: [PATCH] hydra-check: init at 2.0.0 --- pkgs/by-name/hy/hydra-check/package.nix | 51 +++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 pkgs/by-name/hy/hydra-check/package.nix diff --git a/pkgs/by-name/hy/hydra-check/package.nix b/pkgs/by-name/hy/hydra-check/package.nix new file mode 100644 index 0000000000000..18998981a28a4 --- /dev/null +++ b/pkgs/by-name/hy/hydra-check/package.nix @@ -0,0 +1,51 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + openssl, + stdenv, + installShellFiles, +}: + +rustPlatform.buildRustPackage rec { + pname = "hydra-check"; + version = "2.0.0"; + + src = fetchFromGitHub { + owner = "nix-community"; + repo = "hydra-check"; + rev = "v${version}"; + hash = "sha256-4XF3qWQmop8ZMzp25CcMFYNFYLwhwjgtsk8SkikxKSU="; + }; + + cargoHash = "sha256-PmMQMMK9bIyh3vg6AJH6lOEmIlH63iKRhI38rVQ2hKA="; + + nativeBuildInputs = [ + pkg-config + installShellFiles + ]; + + buildInputs = [ + openssl + ]; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd hydra-check \ + --bash <($out/bin/hydra-check --shell-completion bash) \ + --fish <($out/bin/hydra-check --shell-completion fish) \ + --zsh <($out/bin/hydra-check --shell-completion zsh) + ''; + + meta = { + description = "Check hydra for the build status of a package"; + homepage = "https://github.com/nix-community/hydra-check"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ + makefu + artturin + doronbehar + ]; + mainProgram = "hydra-check"; + }; +}