lol

Merge pull request #240573 from gaelreyrol/pulsarctl-init

pulsarctl: init at 2.10.3.3

authored by

Pol Dellaiera and committed by
GitHub
1dba1fa8 b9b176f8

+78
+76
pkgs/tools/admin/pulsarctl/default.nix
··· 1 + { lib 2 + , buildGoModule 3 + , fetchFromGitHub 4 + , installShellFiles 5 + , nix-update-script 6 + , testers 7 + , pulsarctl 8 + }: 9 + 10 + buildGoModule rec { 11 + pname = "pulsarctl"; 12 + version = "2.10.3.3"; 13 + 14 + src = fetchFromGitHub { 15 + owner = "streamnative"; 16 + repo = "pulsarctl"; 17 + rev = "v${version}"; 18 + hash = "sha256-BOVFBIG+XKBOmLOx/IzseEArcPeriJWzn30FOERBy9s="; 19 + }; 20 + 21 + vendorHash = "sha256-ao8Bxaq9LHvC6Zdd1isyMKxoTJ0MGelSPPxwgqVJcK8="; 22 + 23 + nativeBuildInputs = [ installShellFiles ]; 24 + 25 + preBuild = let 26 + buildVars = { 27 + ReleaseVersion = version; 28 + BuildTS = "None"; 29 + GitHash = src.rev; 30 + GitBranch = "None"; 31 + GoVersion = "$(go version | egrep -o 'go[0-9]+[.][^ ]*')"; 32 + }; 33 + buildVarsFlags = lib.concatStringsSep " " (lib.mapAttrsToList (k: v: "-X github.com/streamnative/pulsarctl/pkg/cmdutils.${k}=${v}") buildVars); 34 + in 35 + '' 36 + buildFlagsArray+=("-ldflags=${buildVarsFlags}") 37 + ''; 38 + 39 + excludedPackages = [ 40 + "./pkg/test" 41 + "./pkg/test/bookkeeper" 42 + "./pkg/test/bookkeeper/containers" 43 + "./pkg/test/pulsar" 44 + "./pkg/test/pulsar/containers" 45 + "./site/gen-pulsarctldocs" 46 + "./site/gen-pulsarctldocs/generators" 47 + ]; 48 + 49 + doCheck = false; 50 + 51 + postInstall = '' 52 + installShellCompletion --cmd pulsarctl \ 53 + --bash <($out/bin/pulsarctl completion bash) \ 54 + --fish <($out/bin/pulsarctl completion fish) \ 55 + --zsh <($out/bin/pulsarctl completion zsh) 56 + ''; 57 + 58 + passthru = { 59 + updateScript = nix-update-script { }; 60 + tests.version = testers.testVersion { 61 + package = pulsarctl; 62 + command = "pulsarctl --version"; 63 + version = "v${version}"; 64 + }; 65 + }; 66 + 67 + meta = with lib; { 68 + description = " a CLI for Apache Pulsar written in Go"; 69 + homepage = "https://github.com/streamnative/pulsarctl"; 70 + license = with licenses; [ asl20 ]; 71 + platforms = platforms.unix; 72 + maintainers = with maintainers; [ gaelreyrol ]; 73 + mainProgram = "pulsarctl"; 74 + }; 75 + } 76 +
+2
pkgs/top-level/all-packages.nix
··· 5877 5877 5878 5878 pscale = callPackage ../development/tools/pscale { }; 5879 5879 5880 + pulsarctl = callPackage ../tools/admin/pulsarctl { }; 5881 + 5880 5882 psstop = callPackage ../tools/system/psstop { }; 5881 5883 5882 5884 precice = callPackage ../development/libraries/precice { };