2016-09-21 13:40:30 +01:00
|
|
|
{ stdenv, fetchFromGitHub, jdk, zip, zlib, protobuf3_0, pkgconfig, libarchive, unzip, which, makeWrapper }:
|
2015-03-25 15:12:02 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2016-09-21 13:40:30 +01:00
|
|
|
version = "0.3.1";
|
|
|
|
name = "bazel-${version}";
|
2015-03-25 15:12:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "bazel";
|
2016-09-21 13:40:30 +01:00
|
|
|
rev = version;
|
|
|
|
sha256 = "1cm8zjxf8y3ai6h9wndxvflfsijjqhg87fll9ar7ff0hbbbdf6l5";
|
2015-03-25 15:12:02 +00:00
|
|
|
};
|
|
|
|
|
2016-09-21 13:40:30 +01:00
|
|
|
buildInputs = [ pkgconfig protobuf3_0 zlib zip libarchive unzip which makeWrapper jdk ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
export LD_LIBRARY_PATH="${stdenv.lib.makeLibraryPath [ stdenv.cc.cc.lib ]}"
|
|
|
|
|
|
|
|
bash compile.sh
|
|
|
|
'';
|
2015-03-25 15:12:02 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/share
|
|
|
|
cp -R output $out/share/bazel
|
|
|
|
ln -s $out/share/bazel/bazel $out/bin/bazel
|
2015-07-26 21:45:32 +01:00
|
|
|
wrapProgram $out/bin/bazel --set JAVA_HOME "${jdk.home}"
|
2015-03-25 15:12:02 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://github.com/google/bazel/;
|
|
|
|
description = "Build tool that builds code quickly and reliably";
|
|
|
|
license = stdenv.lib.licenses.asl20;
|
2015-07-26 21:45:32 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.philandstuff ];
|
2016-08-06 14:44:56 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2015-03-25 15:12:02 +00:00
|
|
|
};
|
|
|
|
}
|