From 93aa5b07fcbe0e6c4d2ce1ff41471ca4479cb469 Mon Sep 17 00:00:00 2001 From: Candy Cloud Date: Mon, 2 Jan 2023 12:40:27 +0000 Subject: [PATCH] tidb: init at 6.5.0 --- pkgs/servers/tidb/default.nix | 31 +++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/servers/tidb/default.nix diff --git a/pkgs/servers/tidb/default.nix b/pkgs/servers/tidb/default.nix new file mode 100644 index 000000000000..e9fabdfbd687 --- /dev/null +++ b/pkgs/servers/tidb/default.nix @@ -0,0 +1,31 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "tidb"; + version = "6.5.0"; + + src = fetchFromGitHub { + owner = "pingcap"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-U3RGQADiS3mNq+4U+Qn+LMYbX8vxkTmofnRc+yrAcIA="; + }; + + vendorSha256 = "sha256-ljPFNjnmPaUx1PHtjlJh9ubKBDS3PgvbqTce9pi3GSc="; + + ldflags = [ + "-s" + "-w" + "-X github.com/pingcap/tidb/dumpling/cli.ReleaseVersion=${version}" + "-X github.com/pingcap/tidb/util/versioninfo.TiDBEdition=Community" + ]; + + subPackages = [ "tidb-server" ]; + + meta = with lib; { + description = "An 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; [ candyc1oud ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b81d61fd6f6b..d8424b6ec649 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12285,6 +12285,8 @@ with pkgs; tie = callPackage ../development/tools/misc/tie { }; + tidb = callPackage ../servers/tidb { }; + tikzit = libsForQt5.callPackage ../tools/typesetting/tikzit { }; tinc_pre = callPackage ../tools/networking/tinc/pre.nix { };