bazel: 0.4.4 -> 0.4.5 (#25821)
Also added zsh and bash completion support
This commit is contained in:
parent
030862f63c
commit
965bffdb69
|
@ -1,8 +1,8 @@
|
||||||
{ stdenv, fetchurl, jdk, zip, unzip, bash, makeWrapper }:
|
{ stdenv, fetchurl, jdk, zip, unzip, bash, makeWrapper, which }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
|
||||||
version = "0.4.4";
|
version = "0.4.5";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = http://github.com/bazelbuild/bazel/;
|
homepage = http://github.com/bazelbuild/bazel/;
|
||||||
|
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip";
|
url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip";
|
||||||
sha256 = "1fwfahkqi680zyxmdriqj603lpacyh6cg6ff25bn9bkilbfj2anm";
|
sha256 = "0asmq3kxnl4326zhgh13mvcrc8jvmiswjj4ymrq0943q4vj7nwrb";
|
||||||
};
|
};
|
||||||
|
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
|
@ -42,6 +42,7 @@ stdenv.mkDerivation rec {
|
||||||
zip
|
zip
|
||||||
unzip
|
unzip
|
||||||
makeWrapper
|
makeWrapper
|
||||||
|
which
|
||||||
];
|
];
|
||||||
|
|
||||||
# These must be propagated since the dependency is hidden in a compressed
|
# These must be propagated since the dependency is hidden in a compressed
|
||||||
|
@ -58,6 +59,10 @@ stdenv.mkDerivation rec {
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
export TMPDIR=/tmp
|
export TMPDIR=/tmp
|
||||||
./compile.sh
|
./compile.sh
|
||||||
|
./output/bazel --output_user_root=/tmp/.bazel build //scripts:bash_completion \
|
||||||
|
--spawn_strategy=standalone \
|
||||||
|
--genrule_strategy=standalone
|
||||||
|
cp bazel-bin/scripts/bazel-complete.bash output/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Build the CPP and Java examples to verify that Bazel works.
|
# Build the CPP and Java examples to verify that Bazel works.
|
||||||
|
@ -76,6 +81,9 @@ stdenv.mkDerivation rec {
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
mv output/bazel $out/bin
|
mv output/bazel $out/bin
|
||||||
wrapProgram "$out/bin/bazel" --prefix PATH : "${stdenv.cc}/bin:${jdk}/bin"
|
wrapProgram "$out/bin/bazel" --prefix PATH : "${stdenv.cc}/bin:${jdk}/bin"
|
||||||
|
mkdir -p $out/share/bash-completion/completions $out/share/zsh/site-functions
|
||||||
|
mv output/bazel-complete.bash $out/share/bash-completion/completions/
|
||||||
|
cp scripts/zsh_completion/_bazel $out/share/zsh/site-functions/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
|
|
Loading…
Reference in New Issue