cockroachdb: point to cockroachdb-bin

This commit is contained in:
Aaron Jheng 2023-09-29 13:29:43 +00:00 committed by Austin Seipp
parent ac663ebd21
commit 55bf02190e
3 changed files with 1 additions and 72 deletions

View file

@ -1,70 +0,0 @@
{ lib, stdenv, buildGoPackage, fetchurl
, cmake, xz, which, autoconf
, ncurses6, libedit, libunwind
, installShellFiles
, removeReferencesTo, go
}:
let
darwinDeps = [ libunwind libedit ];
linuxDeps = [ ncurses6 ];
buildInputs = if stdenv.isDarwin then darwinDeps else linuxDeps;
nativeBuildInputs = [ installShellFiles cmake xz which autoconf ];
in
buildGoPackage rec {
pname = "cockroach";
version = "20.1.8";
goPackagePath = "github.com/cockroachdb/cockroach";
src = fetchurl {
url = "https://binaries.cockroachdb.com/cockroach-v${version}.src.tgz";
sha256 = "0mm3hfr778c7djza8gr1clwa8wca4d3ldh9hlg80avw4x664y5zi";
};
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [ "-Wno-error=deprecated-copy" "-Wno-error=redundant-move" "-Wno-error=pessimizing-move" ]);
inherit nativeBuildInputs buildInputs;
buildPhase = ''
runHook preBuild
cd $NIX_BUILD_TOP/go/src/${goPackagePath}
patchShebangs .
make buildoss
cd src/${goPackagePath}
for asset in man autocomplete; do
./cockroachoss gen $asset
done
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -D cockroachoss $out/bin/cockroach
installShellCompletion cockroach.bash
mkdir -p $man/share/man
cp -r man $man/share/man
runHook postInstall
'';
outputs = [ "out" "man" ];
# fails with `GOFLAGS=-trimpath`
allowGoReference = true;
preFixup = ''
find $out -type f -exec ${removeReferencesTo}/bin/remove-references-to -t ${go} '{}' +
'';
meta = with lib; {
homepage = "https://www.cockroachlabs.com";
description = "A scalable, survivable, strongly-consistent SQL database";
license = licenses.bsl11;
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
maintainers = with maintainers; [ rushmorem thoughtpolice ];
};
}

View file

@ -179,6 +179,7 @@ mapAliases ({
claws-mail-gtk3 = claws-mail; # Added 2021-07-10
clucene_core_1 = throw "'clucene_core_1' has been renamed to/replaced by 'clucene_core'"; # Added 2023-12-09
cntk = throw "'cntk' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-10-09
cockroachdb = throw "'cockroachdb' has been removed as it was outdated and unmaintained. Use 'cockroachdb-bin' instead"; # 2024-03-15
codimd = hedgedoc; # Added 2020-11-29
inherit (libsForQt5.mauiPackages) communicator; # added 2022-05-17
compton = throw "'compton' has been renamed to/replaced by 'picom'"; # Converted to throw 2023-09-10

View file

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