Unverified Commit 14e782df authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #279891 from jfchevrette/rosa

rosa: init at 1.2.35
parents 1bae3021 4cb5b43a
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, rosa }:

buildGoModule rec {
  pname = "rosa";
  version = "1.2.36";

  src = fetchFromGitHub {
    owner = "openshift";
    repo = "rosa";
    rev = "v${version}";
    hash = "sha256-jdLMQLbk446QJ+8+HjTCTjtlCuLlZZsLUBInRg4UMH0=";
  };
  vendorHash = null;

  ldflags = [ "-s" "-w" ];

  __darwinAllowLocalNetworking = true;

  nativeBuildInputs = [ installShellFiles ];
  postInstall = ''
    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";
  };

  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 ];
  };
}