summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2017-11-10 20:05:55 +0300
committerNikolay Amiantov <ab@fmap.me>2017-11-10 22:34:42 +0300
commit6bdee9c7300fe415bb74ce93e45fd880445b18c7 (patch)
treeedc33a4df15bd22f6f2e1a3bee2e94386d86e94d /pkgs/development/tools
parent5022edd9eaafb9ae996d3ac603948b08f52c1fe5 (diff)
downloadnixlib-6bdee9c7300fe415bb74ce93e45fd880445b18c7.tar
nixlib-6bdee9c7300fe415bb74ce93e45fd880445b18c7.tar.gz
nixlib-6bdee9c7300fe415bb74ce93e45fd880445b18c7.tar.bz2
nixlib-6bdee9c7300fe415bb74ce93e45fd880445b18c7.tar.lz
nixlib-6bdee9c7300fe415bb74ce93e45fd880445b18c7.tar.xz
nixlib-6bdee9c7300fe415bb74ce93e45fd880445b18c7.tar.zst
nixlib-6bdee9c7300fe415bb74ce93e45fd880445b18c7.zip
bazel: add Nix hacks
Those are needed to build Bazel packages in Nix.
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/build-managers/bazel/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix
index e15b212ebca6..724ae2c80ea5 100644
--- a/pkgs/development/tools/build-managers/bazel/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/default.nix
@@ -1,4 +1,8 @@
-{ stdenv, lib, fetchurl, jdk, zip, unzip, bash, writeScriptBin, coreutils, makeWrapper, which, python }:
+{ stdenv, lib, fetchurl, jdk, zip, unzip, bash, writeScriptBin, coreutils, makeWrapper, which, python
+# Always assume all markers valid (don't redownload dependencies).
+# Also, don't clean up environment variables.
+, enableNixHacks ? false
+}:
 
 stdenv.mkDerivation rec {
 
@@ -21,6 +25,8 @@ stdenv.mkDerivation rec {
 
   sourceRoot = ".";
 
+  patches = lib.optional enableNixHacks ./nix-hacks.patch;
+
   # Bazel expects several utils to be available in Bash even without PATH. Hence this hack.
 
   customBash = writeScriptBin "bash" ''
@@ -74,7 +80,6 @@ stdenv.mkDerivation rec {
   '';
 
   # Bazel expects gcc and java to be in the path.
-
   installPhase = ''
     mkdir -p $out/bin
     mv output/bazel $out/bin