depot/third_party/nixpkgs/pkgs/by-name/re/redpanda-client/package.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

51 lines
1.3 KiB
Nix

{
buildGoModule,
doCheck ? !stdenv.hostPlatform.isDarwin, # Can't start localhost test server in MacOS sandbox.
fetchFromGitHub,
installShellFiles,
lib,
stdenv,
}:
let
version = "24.3.6";
src = fetchFromGitHub {
owner = "redpanda-data";
repo = "redpanda";
rev = "v${version}";
sha256 = "sha256-OxaAWQKa1rmMf0F/Pu0ZH0DYG5UIEri/RBYJ4fEgkYI=";
};
in
buildGoModule rec {
pname = "redpanda-rpk";
inherit doCheck src version;
modRoot = "./src/go/rpk";
runVend = false;
vendorHash = "sha256-VR8HvU8aPBWaKH+xjn+2CO794cipB7mOJCkXtGYGsdk=";
ldflags = [
''-X "github.com/redpanda-data/redpanda/src/go/rpk/pkg/cli/cmd/version.version=${version}"''
''-X "github.com/redpanda-data/redpanda/src/go/rpk/pkg/cli/cmd/version.rev=v${version}"''
''-X "github.com/redpanda-data/redpanda/src/go/rpk/pkg/cli/cmd/container/common.tag=v${version}"''
];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
for shell in bash fish zsh; do
$out/bin/rpk generate shell-completion $shell > rpk.$shell
installShellCompletion rpk.$shell
done
'';
meta = with lib; {
description = "Redpanda client";
homepage = "https://redpanda.com/";
license = licenses.bsl11;
maintainers = with maintainers; [
avakhrenev
happysalada
];
platforms = platforms.all;
mainProgram = "rpk";
};
}