nixpkgs/pkgs/tools/admin/rhoas/default.nix

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

47 lines
1.2 KiB
Nix
Raw Normal View History

2022-11-29 23:06:46 +00:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, rhoas }:
buildGoModule rec {
pname = "rhoas";
2023-04-19 23:35:31 +00:00
version = "0.53.0";
2022-11-29 23:06:46 +00:00
src = fetchFromGitHub {
owner = "redhat-developer";
repo = "app-services-cli";
rev = "v${version}";
2023-04-19 23:35:31 +00:00
sha256 = "sha256-9fydRgp2u1LWf0lEDMi1OxxFURd14oKCBDKACqrgWII=";
2022-11-29 23:06:46 +00:00
};
2023-04-19 23:35:31 +00:00
vendorHash = null;
2022-11-29 23:06:46 +00:00
ldflags = [
"-s"
"-w"
"-X github.com/redhat-developer/app-services-cli/internal/build.Version=${version}"
];
nativeBuildInputs = [installShellFiles];
# Networking tests fail.
doCheck = false;
postInstall = ''
installShellCompletion --cmd rhoas \
--bash <($out/bin/rhoas completion bash) \
--fish <($out/bin/rhoas completion fish) \
--zsh <($out/bin/rhoas completion zsh)
'';
passthru.tests.version = testers.testVersion {
package = rhoas;
command = "HOME=$TMP rhoas version";
};
meta = with lib; {
description = "Command Line Interface for Red Hat OpenShift Application Services";
license = licenses.asl20;
homepage = "https://github.com/redhat-developer/app-services-cli";
changelog = "https://github.com/redhat-developer/app-services-cli/releases/v${version}";
maintainers = with maintainers; [stehessel];
};
}