You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{ pkgs ? import <nixpkgs> {} }:
|
|
with pkgs;
|
|
|
|
let
|
|
version = "5.1.1";
|
|
os = "linux";
|
|
architecture = "amd64";
|
|
|
|
binaryPackage = meta: stdenv.mkDerivation ({
|
|
phases = "unpackPhase installPhase fixupPhase";
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp -r * $out/bin/
|
|
'';
|
|
sourceRoot = ".";
|
|
nativeBuildInputs = [ autoPatchelfHook ];
|
|
} // meta);
|
|
|
|
serverPackage = binaryPackage {
|
|
name = "tikv-server-${version}";
|
|
src = fetchurl {
|
|
url = "https://tiup-mirrors.pingcap.com/tikv-v${version}-${os}-${architecture}.tar.gz";
|
|
sha256 = "0sl6bhy7irvk48pss2bmmnl4yflxkpi8kfl8hg09bk7a8dqjqfcy";
|
|
};
|
|
};
|
|
|
|
pdPackage = binaryPackage {
|
|
name = "tikv-pd-${version}";
|
|
src = fetchurl {
|
|
url = "https://tiup-mirrors.pingcap.com/pd-v${version}-${os}-${architecture}.tar.gz";
|
|
sha256 = "1mzkbnid4kzxysnnkngvdqxfxvdcm718j248181zax1rl0x313ps";
|
|
};
|
|
};
|
|
|
|
ctlPackage = binaryPackage {
|
|
name = "tikv-ctl-${version}";
|
|
src = fetchurl {
|
|
url = "https://tiup-mirrors.pingcap.com/ctl-v${version}-${os}-${architecture}.tar.gz";
|
|
sha256 = "0g8wkqqyi8zvh3zfslyzf0c1nijw7maqlp99lrfw6vql4k3wn6b1";
|
|
};
|
|
};
|
|
in stdenv.mkDerivation rec {
|
|
name = "zapdb-kv-env";
|
|
buildInputs = [
|
|
serverPackage
|
|
pdPackage
|
|
ctlPackage
|
|
];
|
|
}
|