cockroachdb-bin: init at 23.1.7

Add cockroachdb-bin using pre-build binaries, since building from
source seem impossible.
This commit is contained in:
Alexander Ben Nasrallah 2023-06-30 09:36:17 +02:00
parent 82b98eb23f
commit 609ebcafaf
2 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,38 @@
{ lib
, stdenv
, fetchzip
, buildFHSEnv
}:
let
version = "23.1.7";
name = "cockroachdb-${version}";
# For several reasons building cockroach from source has become
# nearly imposible. See https://github.com/NixOS/nixpkgs/pull/152626
# Therefore we use the pre-build release binary and wrap it with buildFHSUserEnv to
# work on nix.
# You can generate the hashes with
# nix flake prefetch <url>
src = fetchzip (lib.getAttr stdenv.system {
x86_64-linux = {
name = "cockroachdb-release-${version}";
url = "https://binaries.cockroachdb.com/cockroach-v${version}.linux-amd64.tgz";
sha256 = "sha256-FL/zDrl+QstBp54LE9/SbIfSPorneGZSef6dcOQJbSo=";
};
});
in
buildFHSEnv {
inherit name;
runScript = "${src}/cockroach";
meta = with lib; {
homepage = "https://www.cockroachlabs.com";
description = "A scalable, survivable, strongly-consistent SQL database";
license = licenses.bsl11;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ rushmorem thoughtpolice neosimsim ];
};
}

View file

@ -27384,6 +27384,8 @@ with pkgs;
cockroachdb = callPackage ../servers/sql/cockroachdb { }; cockroachdb = callPackage ../servers/sql/cockroachdb { };
cockroachdb-bin = callPackage ../servers/sql/cockroachdb/cockroachdb-bin.nix { };
coconutbattery = callPackage ../os-specific/darwin/coconutbattery { }; coconutbattery = callPackage ../os-specific/darwin/coconutbattery { };
conky = callPackage ../os-specific/linux/conky ({ conky = callPackage ../os-specific/linux/conky ({