about summary refs log tree commit diff
path: root/pkgs/development/tools/build-managers
diff options
context:
space:
mode:
authorGuillaume Bouchard <guillaume.bouchard@tweag.io>2019-06-20 17:20:58 +0200
committerGuillaume Bouchard <guillaume.bouchard@tweag.io>2019-06-22 21:46:50 +0200
commit27d4ce7ce08613ab124d160ff269c48c86eb3d83 (patch)
treea5690b7b0758cf638009f2650bfa0176c22aa3cd /pkgs/development/tools/build-managers
parent7fed6eabcf76bd3bec4d8e5d384cd162c68ebfce (diff)
downloadnixlib-27d4ce7ce08613ab124d160ff269c48c86eb3d83.tar
nixlib-27d4ce7ce08613ab124d160ff269c48c86eb3d83.tar.gz
nixlib-27d4ce7ce08613ab124d160ff269c48c86eb3d83.tar.bz2
nixlib-27d4ce7ce08613ab124d160ff269c48c86eb3d83.tar.lz
nixlib-27d4ce7ce08613ab124d160ff269c48c86eb3d83.tar.xz
nixlib-27d4ce7ce08613ab124d160ff269c48c86eb3d83.tar.zst
nixlib-27d4ce7ce08613ab124d160ff269c48c86eb3d83.zip
bazel: Full switch to python3
Diffstat (limited to 'pkgs/development/tools/build-managers')
-rw-r--r--pkgs/development/tools/build-managers/bazel/default.nix13
1 files changed, 6 insertions, 7 deletions
diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix
index 2cb00be63a90..257cc185b2e2 100644
--- a/pkgs/development/tools/build-managers/bazel/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/default.nix
@@ -2,7 +2,7 @@
 # this package (through the fixpoint glass)
 , bazel
 , lr, xe, zip, unzip, bash, writeCBin, coreutils
-, which, python, gawk, gnused, gnutar, gnugrep, gzip, findutils
+, which, gawk, gnused, gnutar, gnugrep, gzip, findutils
 # updater
 , python3, writeScript
 # Apple dependencies
@@ -292,8 +292,8 @@ stdenv.mkDerivation rec {
       # Substitute python's stub shebang to plain python path. (see TODO add pr URL)
       # See also `postFixup` where python is added to $out/nix-support
       substituteInPlace src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt\
-          --replace "/usr/bin/env python" "${python}/bin/python" \
-          --replace "NIX_STORE_PYTHON_PATH" "${python}/bin/python" \
+          --replace "/usr/bin/env python" "${python3}/bin/python" \
+          --replace "NIX_STORE_PYTHON_PATH" "${python3}/bin/python" \
 
       # md5sum is part of coreutils
       sed -i 's|/sbin/md5|md5sum|' \
@@ -374,15 +374,14 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     buildJdk
-    python3 # bazel build requires python3. However we still use python2 for most of the other tasks
-            # This will have to be refactored later.
+    python3
   ];
 
   # when a command can’t be found in a bazel build, you might also
   # need to add it to `defaultShellPath`.
   nativeBuildInputs = [
     zip
-    python
+    python3
     unzip
     makeWrapper
     which
@@ -491,7 +490,7 @@ stdenv.mkDerivation rec {
     echo "${customBash} ${defaultShellPath}" >> $out/nix-support/depends
     # The templates get tar’d up into a .jar,
     # so nix can’t detect python is needed in the runtime closure
-    echo "${python}" >> $out/nix-support/depends
+    echo "${python3}" >> $out/nix-support/depends
   '';
 
   dontStrip = true;