@@ -0,0 +1,28 @@
1+{ stdenv, fetchFromGitHub, jdk, zip, zlib, protobuf, pkgconfig, libarchive, unzip, makeWrapper }:
2+
3+stdenv.mkDerivation rec {
4+ name = "bazel-20150325.9a0dc1b2";
5+
6+ src = fetchFromGitHub {
7+ owner = "google";
8+ repo = "bazel";
9+ rev = "9a0dc1b2";
10+ sha256 = "1bgx12bnrqxz720ljn7kdzd4678p4mxldiylll3h0v5673vgrf5p";
11+ };
12+
13+ buildInputs = [ pkgconfig protobuf zlib zip jdk libarchive unzip makeWrapper ];
14+
15+ installPhase = ''
16+ PROTOC=protoc bash compile.sh
17+ mkdir -p $out/bin $out/share
18+ cp -R output $out/share/bazel
19+ ln -s $out/share/bazel/bazel $out/bin/bazel
20+ wrapProgram $out/bin/bazel --set JAVA_HOME "${jdk}"
21+ '';
22+
23+ meta = {
24+ homepage = http://github.com/google/bazel/;
25+ description = "Build tool that builds code quickly and reliably";
26+ license = stdenv.lib.licenses.asl20;
27+ };
28+}