From 8d5f06cbeedcfb4a88c111754baf2d7e315e74de Mon Sep 17 00:00:00 2001 From: Mathieu Boespflug Date: Thu, 28 Jun 2018 18:05:32 +0200 Subject: [PATCH 1/3] bazel: 0.13.0 -> 0.15.0 Upgrade to latest Bazel. --- pkgs/development/tools/build-managers/bazel/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix index 28214e94c7aa0..0a800b449f79e 100644 --- a/pkgs/development/tools/build-managers/bazel/default.nix +++ b/pkgs/development/tools/build-managers/bazel/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { - version = "0.13.0"; + version = "0.15.0"; meta = with stdenv.lib; { homepage = "https://github.com/bazelbuild/bazel/"; @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip"; - sha256 = "143nd9dmw2x88azf8spinl2qnvw9m8lqlqc765l9q2v6hi807sc2"; + sha256 = "00mnlzcflnsdah8dvpaq0jqawmhgmv9mrjah6cr8qssycbk1ddy3"; }; sourceRoot = "."; From d2b5e7ec38ffe54e28236bd2c0f3afb35307b78c Mon Sep 17 00:00:00 2001 From: Mathieu Boespflug Date: Sun, 15 Jul 2018 22:54:26 +0200 Subject: [PATCH 2/3] bazel: make the build --sandbox compatible by building extra deps separately. --- .../tools/build-managers/bazel/default.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix index 0a800b449f79e..9c3e5d62c7276 100644 --- a/pkgs/development/tools/build-managers/bazel/default.nix +++ b/pkgs/development/tools/build-managers/bazel/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, jdk, zip, unzip, bash, writeCBin, coreutils, makeWrapper, which, python, gnused +{ stdenv, lib, fetchurl, runCommand, jdk, zip, unzip, bash, writeCBin, coreutils, makeWrapper, which, python, gnused # Always assume all markers valid (don't redownload dependencies). # Also, don't clean up environment variables. , enableNixHacks ? false @@ -6,6 +6,17 @@ , libcxx, CoreFoundation, CoreServices, Foundation }: +let srcDeps = stdenv.lib.singleton ( + fetchurl { + url = "https://github.com/google/desugar_jdk_libs/archive/f5e6d80c6b4ec6b0a46603f72b015d45cf3c11cd.zip"; + sha256 = "c80f3f3d442d8a6ca7adc83f90ecd638c3864087fdd6787ffac070b6f1cc8f9b"; + } + ); + distDir = runCommand "bazel-deps" {} '' + mkdir -p $out + for i in ${builtins.toString srcDeps}; do cp $i $out/$(stripHash $i); done + ''; +in stdenv.mkDerivation rec { version = "0.15.0"; @@ -67,6 +78,9 @@ stdenv.mkDerivation rec { # Fixup scripts that generate scripts. Not fixed up by patchShebangs below. substituteInPlace scripts/bootstrap/compile.sh \ --replace /bin/sh ${customBash}/bin/bash + + echo "build --experimental_distdir=${distDir}" >> .bazelrc + echo "fetch --experimental_distdir=${distDir}" >> .bazelrc echo "build --copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt=\"/g')\"" >> .bazelrc echo "build --host_copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt=\"/g')\"" >> .bazelrc echo "build --linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt=\"-Wl,/g')\"" >> .bazelrc From 9201ed784c8d974818f10d1c8830ff699e4efb25 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 16 Jul 2018 19:58:49 +0200 Subject: [PATCH 3/3] bazel: 0.15 -> 0.15.1 --- pkgs/development/tools/build-managers/bazel/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix index 9c3e5d62c7276..f9be5053b125a 100644 --- a/pkgs/development/tools/build-managers/bazel/default.nix +++ b/pkgs/development/tools/build-managers/bazel/default.nix @@ -19,7 +19,7 @@ let srcDeps = stdenv.lib.singleton ( in stdenv.mkDerivation rec { - version = "0.15.0"; + version = "0.15.1"; meta = with stdenv.lib; { homepage = "https://github.com/bazelbuild/bazel/"; @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip"; - sha256 = "00mnlzcflnsdah8dvpaq0jqawmhgmv9mrjah6cr8qssycbk1ddy3"; + sha256 = "0v7wdwbxy4bcx488lm1glf4iv3wfdwbkg8fh6kmmmfn1lhgkaay6"; }; sourceRoot = ".";