os/pkgs/cockroach.nix

25 lines
704 B
Nix

self:
with self;
stdenv.mkDerivation rec {
pname = "cockroachdb";
version = "22.2.7";
src = fetchurl {
url = "https://binaries.cockroachdb.com/cockroach-v${version}.linux-amd64.tgz";
sha256 = "sha256-do426BaZdPqXcc/aQnRAgVTBCJ/OiNbSuCpwVTM2m0I=";
};
buildInputs = [stdenv.cc.cc];
nativeBuildInputs = [autoPatchelfHook];
installPhase = ''
install -D -m755 cockroach $out/bin/cockroach
cp -r lib $out/lib
'';
meta = {
homepage = "https://www.cockroachlabs.com";
description = "A scalable, survivable, strongly-consistent SQL database";
platforms = ["x86_64-linux"];
maintainers = [ lib.maintainers.mic92 ];
};
}