git.iko.soy/typeable/nixpkgs
on master help sign in
bazel: Full switch to python3
commit27d4ce7ce08613ab124d160ff269c48c86eb3d83 authorGuillaume Bouchard <guillaume.bouchard@tweag.io> dateThu 20 Jun 2019, 17:20 (7 years ago) parent7fed6ea
1 file changed+6−7
pkgs/development/tools/build-managers/bazel/default.nix+6−7
pkgs/development/tools/build-managers/bazel/default.nix+6−7
@@ -2,7 +2,7 @@
22# this package (through the fixpoint glass)
33, bazel
44, lr, xe, zip, unzip, bash, writeCBin, coreutils
5−, which, python, gawk, gnused, gnutar, gnugrep, gzip, findutils
5+, which, gawk, gnused, gnutar, gnugrep, gzip, findutils
66# updater
77, python3, writeScript
88# Apple dependencies
@@ -292,8 +292,8 @@ stdenv.mkDerivation rec {
292292 # Substitute python's stub shebang to plain python path. (see TODO add pr URL)
293293 # See also `postFixup` where python is added to $out/nix-support
294294 substituteInPlace src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt\
295− --replace "/usr/bin/env python" "${python}/bin/python" \
296− --replace "NIX_STORE_PYTHON_PATH" "${python}/bin/python" \
295+ --replace "/usr/bin/env python" "${python3}/bin/python" \
296+ --replace "NIX_STORE_PYTHON_PATH" "${python3}/bin/python" \
297297
298298 # md5sum is part of coreutils
299299 sed -i 's|/sbin/md5|md5sum|' \
@@ -374,15 +374,14 @@ stdenv.mkDerivation rec {
374374
375375 buildInputs = [
376376 buildJdk
377− python3 # bazel build requires python3. However we still use python2 for most of the other tasks
378− # This will have to be refactored later.
377+ python3
379378 ];
380379
381380 # when a command can’t be found in a bazel build, you might also
382381 # need to add it to `defaultShellPath`.
383382 nativeBuildInputs = [
384383 zip
385− python
384+ python3
386385 unzip
387386 makeWrapper
388387 which
@@ -491,7 +490,7 @@ stdenv.mkDerivation rec {
491490 echo "${customBash} ${defaultShellPath}" >> $out/nix-support/depends
492491 # The templates get tar’d up into a .jar,
493492 # so nix can’t detect python is needed in the runtime closure
494− echo "${python}" >> $out/nix-support/depends
493+ echo "${python3}" >> $out/nix-support/depends
495494 '';
496495
497496 dontStrip = true;