aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/servers/sql/cockroachdb/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/sql/cockroachdb/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/sql/cockroachdb/default.nix13
1 files changed, 5 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/servers/sql/cockroachdb/default.nix b/nixpkgs/pkgs/servers/sql/cockroachdb/default.nix
index 8f3d2a7b285..2ce8e901e86 100644
--- a/nixpkgs/pkgs/servers/sql/cockroachdb/default.nix
+++ b/nixpkgs/pkgs/servers/sql/cockroachdb/default.nix
@@ -1,6 +1,7 @@
{ stdenv, buildGoPackage, fetchurl
, cmake, xz, which, autoconf
, ncurses6, libedit, libunwind
+, installShellFiles
}:
let
@@ -8,7 +9,7 @@ let
linuxDeps = [ ncurses6 ];
buildInputs = if stdenv.isDarwin then darwinDeps else linuxDeps;
- nativeBuildInputs = [ cmake xz which autoconf ];
+ nativeBuildInputs = [ installShellFiles cmake xz which autoconf ];
in
buildGoPackage rec {
@@ -41,8 +42,8 @@ buildGoPackage rec {
installPhase = ''
runHook preInstall
- install -D cockroachoss $bin/bin/cockroach
- install -D cockroach.bash $bin/share/bash-completion/completions/cockroach.bash
+ install -D cockroachoss $out/bin/cockroach
+ installShellCompletion cockroach.bash
mkdir -p $man/share/man
cp -r man $man/share/man
@@ -50,11 +51,7 @@ buildGoPackage rec {
runHook postInstall
'';
- # Unfortunately we have to keep an empty reference to $out, because it seems
- # buildGoPackages only nukes references to the go compiler under $bin, effectively
- # making all binary output under $bin mandatory. Ideally, we would just use
- # $out and $man and remove $bin since there's no point in an empty path. :(
- outputs = [ "bin" "man" "out" ];
+ outputs = [ "out" "man" ];
meta = with stdenv.lib; {
homepage = "https://www.cockroachlabs.com";