From 8939568d7c9a4f71d1adbf3637df2d9eab69c5fe Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 7 Apr 2023 16:00:19 +0200 Subject: [PATCH] teutat3s: add cockroach-bin --- pkgs/cockroach.nix | 24 ++++++++++++++++++++++++ pkgs/default.nix | 1 + users/teutat3s/home.nix | 1 + 3 files changed, 26 insertions(+) create mode 100644 pkgs/cockroach.nix diff --git a/pkgs/cockroach.nix b/pkgs/cockroach.nix new file mode 100644 index 00000000..0a5bc5d2 --- /dev/null +++ b/pkgs/cockroach.nix @@ -0,0 +1,24 @@ +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 = with lib; { + homepage = "https://www.cockroachlabs.com"; + description = "A scalable, survivable, strongly-consistent SQL database"; + platforms = ["x86_64-linux"]; + maintainers = with maintainers; [mic92]; + }; + } diff --git a/pkgs/default.nix b/pkgs/default.nix index 901f646f..de65b068 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -21,6 +21,7 @@ with final; { wcwd = writeShellScriptBin "wcwd" (import ./wcwd.nix final); drone-docker-runner = writeShellScriptBin "drone-docker-runner" (import ./drone-docker-runner.nix final); record-screen = writeShellScriptBin "record-screen" (import ./record-screen.nix final); + cockroach-bin = import ./cockroach.nix final; # ps-fixes } diff --git a/users/teutat3s/home.nix b/users/teutat3s/home.nix index 8da2d1af..010d2c46 100644 --- a/users/teutat3s/home.nix +++ b/users/teutat3s/home.nix @@ -68,6 +68,7 @@ in { waypoint yubikey-agent age-plugin-yubikey + cockroach-bin nix-autobahn.packages.${pkgs.system}.default ]; programs.bash.initExtra = ''