Files
nixpkgs/pkgs/by-name/rh/rhoas/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

56 lines
1.4 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
stdenv,
installShellFiles,
testers,
rhoas,
}:
buildGoModule rec {
pname = "rhoas";
version = "0.53.0";
src = fetchFromGitHub {
owner = "redhat-developer";
repo = "app-services-cli";
rev = "v${version}";
sha256 = "sha256-9fydRgp2u1LWf0lEDMi1OxxFURd14oKCBDKACqrgWII=";
};
vendorHash = null;
ldflags = [
"-s"
"-w"
"-X github.com/redhat-developer/app-services-cli/internal/build.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
# Networking tests fail.
doCheck = false;
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd rhoas \
--bash <(HOME=$TMP $out/bin/rhoas completion bash) \
--fish <(HOME=$TMP $out/bin/rhoas completion fish) \
--zsh <(HOME=$TMP $out/bin/rhoas completion zsh)
'';
passthru.tests.version = testers.testVersion {
package = rhoas;
command = "HOME=$TMP rhoas version";
};
meta = {
description = "Command Line Interface for Red Hat OpenShift Application Services";
license = lib.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 lib.maintainers; [ stehessel ];
mainProgram = "rhoas";
};
}