uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
70
pkgs/servers/sql/cockroachdb/default.nix
Normal file
70
pkgs/servers/sql/cockroachdb/default.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{ 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";
|
||||
};
|
||||
|
||||
NIX_CFLAGS_COMPILE = 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 ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue