Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, rhoas }: 2 3buildGoModule rec { 4 pname = "rhoas"; 5 version = "0.53.0"; 6 7 src = fetchFromGitHub { 8 owner = "redhat-developer"; 9 repo = "app-services-cli"; 10 rev = "v${version}"; 11 sha256 = "sha256-9fydRgp2u1LWf0lEDMi1OxxFURd14oKCBDKACqrgWII="; 12 }; 13 14 vendorHash = null; 15 16 ldflags = [ 17 "-s" 18 "-w" 19 "-X github.com/redhat-developer/app-services-cli/internal/build.Version=${version}" 20 ]; 21 22 nativeBuildInputs = [installShellFiles]; 23 24 # Networking tests fail. 25 doCheck = false; 26 27 postInstall = '' 28 installShellCompletion --cmd rhoas \ 29 --bash <($out/bin/rhoas completion bash) \ 30 --fish <($out/bin/rhoas completion fish) \ 31 --zsh <($out/bin/rhoas completion zsh) 32 ''; 33 34 passthru.tests.version = testers.testVersion { 35 package = rhoas; 36 command = "HOME=$TMP rhoas version"; 37 }; 38 39 meta = with lib; { 40 description = "Command Line Interface for Red Hat OpenShift Application Services"; 41 license = licenses.asl20; 42 homepage = "https://github.com/redhat-developer/app-services-cli"; 43 changelog = "https://github.com/redhat-developer/app-services-cli/releases/v${version}"; 44 maintainers = with maintainers; [stehessel]; 45 }; 46}