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
68 lines
1.5 KiB
Nix
68 lines
1.5 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
testers,
|
|
rosa,
|
|
nix-update-script,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "rosa";
|
|
version = "1.2.56";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "openshift";
|
|
repo = "rosa";
|
|
rev = "v${version}";
|
|
hash = "sha256-wRLdxnAD9wZeIwWiX+x/j2gaVv1/iEsy3jYIeb3hWoo=";
|
|
};
|
|
vendorHash = null;
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
# skip e2e tests package
|
|
excludedPackages = [ "tests/e2e" ];
|
|
|
|
# skip tests that require network access
|
|
checkFlags =
|
|
let
|
|
skippedTests = [
|
|
"TestCluster"
|
|
"TestRhRegionCommand"
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ "TestCache" ];
|
|
in
|
|
[ "-skip=^${lib.concatStringsSep "$|^" skippedTests}$" ];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd rosa \
|
|
--bash <($out/bin/rosa completion bash) \
|
|
--fish <($out/bin/rosa completion fish) \
|
|
--zsh <($out/bin/rosa completion zsh)
|
|
'';
|
|
|
|
passthru = {
|
|
tests.version = testers.testVersion {
|
|
package = rosa;
|
|
command = "rosa version --client";
|
|
};
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "CLI for the Red Hat OpenShift Service on AWS";
|
|
license = licenses.asl20;
|
|
homepage = "https://github.com/openshift/rosa";
|
|
maintainers = with maintainers; [ jfchevrette ];
|
|
};
|
|
}
|