nixpkgs/pkgs/by-name/ti/tidb/package.nix
2024-11-12 01:01:46 +00:00

31 lines
861 B
Nix

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "tidb";
version = "8.4.0";
src = fetchFromGitHub {
owner = "pingcap";
repo = pname;
rev = "v${version}";
sha256 = "sha256-AVREHQnEBCU5Z9aiYWVi2jzZ5amb/Bc0jJogwGunU84=";
};
vendorHash = "sha256-zRTFmXNTc2M24q8ClqsjNsok4RMi1Yyfe2ItE8I2Ww4=";
ldflags = [
"-X github.com/pingcap/tidb/pkg/parser/mysql.TiDBReleaseVersion=${version}"
"-X github.com/pingcap/tidb/pkg/util/versioninfo.TiDBEdition=Community"
];
subPackages = [ "cmd/tidb-server" ];
meta = with lib; {
description = "Open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics";
homepage = "https://pingcap.com";
license = licenses.asl20;
maintainers = with maintainers; [ Makuru ];
mainProgram = "tidb-server";
};
}