bazel_0_4: remove

bazel_0_4 fails to build since 2018-04-29, so clearly nobody is using
it.
This commit is contained in:
Florian Klink 2019-10-14 18:01:37 +02:00 committed by Profpatsch
parent fa7ed535d0
commit 0fd1df74be
3 changed files with 0 additions and 154 deletions

@ -1,100 +0,0 @@
{ stdenv, lib, fetchurl, jdk, zip, unzip, bash, makeWrapper, which, coreutils
# Always assume all markers valid (don't redownload dependencies).
# Also, don't clean up environment variables.
, enableNixHacks ? false
}:
stdenv.mkDerivation rec {
version = "0.4.5";
meta = with stdenv.lib; {
homepage = https://github.com/bazelbuild/bazel/;
description = "Build tool that builds code quickly and reliably";
license = licenses.asl20;
maintainers = with maintainers; [ cstrahan philandstuff ];
platforms = platforms.linux;
broken = true; # 2018-08-07
};
pname = "bazel";
src = fetchurl {
url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip";
sha256 = "0asmq3kxnl4326zhgh13mvcrc8jvmiswjj4ymrq0943q4vj7nwrb";
};
preUnpack = ''
mkdir bazel
cd bazel
'';
sourceRoot = ".";
patches = lib.optional enableNixHacks ./nix-hacks-0.4.patch;
postPatch = ''
for f in $(grep -l -r '/bin/bash'); do
substituteInPlace "$f" --replace '/bin/bash' '${bash}/bin/bash'
done
for f in $(grep -l -r '/usr/bin/env'); do
substituteInPlace "$f" --replace '/usr/bin/env' '${coreutils}/bin/env'
done
'' + lib.optionalString stdenv.isDarwin ''
sed -i 's,/usr/bin/xcrun clang,clang,g' \
scripts/bootstrap/compile.sh \
src/tools/xcode/realpath/BUILD \
src/tools/xcode/stdredirect/BUILD \
src/tools/xcode/xcrunwrapper/xcrunwrapper.sh
sed -i 's,/usr/bin/xcrun "''${TOOLNAME}","''${TOOLNAME}",g' \
src/tools/xcode/xcrunwrapper/xcrunwrapper.sh
sed -i 's/"xcrun", "clang"/"clang"/g' tools/osx/xcode_configure.bzl
'';
buildInputs = [
jdk
zip
unzip
makeWrapper
which
];
# These must be propagated since the dependency is hidden in a compressed
# archive.
propagatedBuildInputs = [
bash
];
buildPhase = ''
export TMPDIR=/tmp/.bazel-$UID
./compile.sh
./output/bazel --output_user_root=$TMPDIR/.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.
doCheck = true;
checkPhase = ''
export TEST_TMPDIR=$(pwd)
./output/bazel test --test_output=errors \
examples/cpp:hello-success_test \
examples/java-native/src/test/java/com/example/myproject:hello
'';
# Bazel expects gcc and java to be in the path.
installPhase = ''
mkdir -p $out/bin
mv output/bazel $out/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;
dontPatchELF = true;
}

@ -1,51 +0,0 @@
diff --git a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java
index eafa09fb5..d2d5e40e8 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java
@@ -287,21 +287,8 @@ public final class RepositoryDelegatorFunction implements SkyFunction {
markerData.put(key, value);
}
}
- boolean result = false;
- if (markerRuleKey.equals(ruleKey)) {
- result = handler.verifyMarkerData(rule, markerData, env);
- if (env.valuesMissing()) {
- return null;
- }
- }
- if (result) {
- return new Fingerprint().addString(content).digestAndReset();
- } else {
- // So that we are in a consistent state if something happens while fetching the repository
- markerPath.delete();
- return null;
- }
+ return new Fingerprint().addString(content).digestAndReset();
} catch (IOException e) {
throw new RepositoryFunctionException(e, Transience.TRANSIENT);
diff --git a/src/main/java/com/google/devtools/build/lib/shell/JavaSubprocessFactory.java b/src/main/java/com/google/devtools/build/lib/shell/JavaSubprocessFactory.java
index a7ebc8f7a..40f2049fa 100644
--- a/src/main/java/com/google/devtools/build/lib/shell/JavaSubprocessFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/shell/JavaSubprocessFactory.java
@@ -129,7 +129,6 @@ public class JavaSubprocessFactory implements SubprocessFactory {
ProcessBuilder builder = new ProcessBuilder();
builder.command(params.getArgv());
if (params.getEnv() != null) {
- builder.environment().clear();
builder.environment().putAll(params.getEnv());
}
diff --git a/src/main/java/com/google/devtools/build/lib/worker/Worker.java b/src/main/java/com/google/devtools/build/lib/worker/Worker.java
index 0268d1b2b..637364657 100644
--- a/src/main/java/com/google/devtools/build/lib/worker/Worker.java
+++ b/src/main/java/com/google/devtools/build/lib/worker/Worker.java
@@ -77,7 +77,6 @@ class Worker {
new ProcessBuilder(command)
.directory(workDir.getPathFile())
.redirectError(Redirect.appendTo(logFile.getPathFile()));
- processBuilder.environment().clear();
processBuilder.environment().putAll(workerKey.getEnv());
this.process = processBuilder.start();

@ -9292,9 +9292,6 @@ in
bam = callPackage ../development/tools/build-managers/bam {};
bazel_0_4 = callPackage ../development/tools/build-managers/bazel/0.4.nix {
stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv;
};
bazel = callPackage ../development/tools/build-managers/bazel {
inherit (darwin) cctools;
inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices Foundation;