nixpkgs-suyu/pkgs/servers/redpanda/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.4 KiB
Nix
Raw Normal View History

2022-05-03 01:49:02 +02:00
{ lib, stdenv, fetchzip }:
let
version = "22.1.3";
2022-05-03 01:49:02 +02:00
platform = if stdenv.isLinux then "linux" else "darwin";
arch = if stdenv.isAarch64 then "arm" else "amd";
sha256s = {
darwin.amd = "sha256-AXk3aP1SGiHTfHTCBRTagX0DAVmdcVVIkxWaTnZxB8g=";
darwin.arm = "sha256-pvOVvNc8lZ2d2fVZVYWvumVWYpnLORNY/3o1t4BN2N4=";
linux.amd = "sha256-Uz7KjbsH3lKRL0iI73DxwS5rcIkPQiMFkIQsc06gF0k=";
linux.arm = "sha256-WHjYAbytiu747jFqN0KZ/CkIwAVI7fb32ywtRiQOBm8=";
};
2022-05-03 01:49:02 +02:00
in stdenv.mkDerivation rec {
pname = "redpanda";
inherit version;
src = fetchzip {
url = "https://github.com/redpanda-data/redpanda/releases/download/v${version}/rpk-${platform}-${arch}64.zip";
sha256 = sha256s.${platform}.${arch};
2022-05-03 01:49:02 +02:00
};
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp rpk $out/bin
${lib.optionalString stdenv.isLinux ''
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/bin/rpk
''}
2022-05-03 01:49:02 +02:00
runHook postInstall
'';
# stripping somehow completely breaks it
dontStrip = true;
meta = with lib; {
description = "Redpanda is a streaming data platform for developers. Kafka API compatible. 10x faster. No ZooKeeper. No JVM! ";
license = licenses.bsl11;
homepage = "https://redpanda.com/";
maintainers = with maintainers; [ happysalada ];
platforms = platforms.all;
};
}