Unverified Commit a39f2dee authored by jopejoe1's avatar jopejoe1 Committed by GitHub
Browse files

python3Packages.tensorflow: move env variables into env for structuredAttrs (#488547)

parents ffd12fb0 897ac68c
Loading
Loading
Loading
Loading
+83 −81
Original line number Diff line number Diff line
@@ -344,6 +344,7 @@ let
    ++ lib.optionals mklSupport [ mkl ]
    ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ nsync ];

    env = {
      # arbitrarily set to the current latest bazel version, overly careful
      TF_IGNORE_MAX_BAZEL_VERSION = true;

@@ -423,6 +424,10 @@ let
      GCC_HOST_COMPILER_PREFIX = lib.optionalString cudaSupport "${cudatoolkit_cc_joined}/bin";
      GCC_HOST_COMPILER_PATH = lib.optionalString cudaSupport "${cudatoolkit_cc_joined}/bin/cc";

      # https://github.com/tensorflow/tensorflow/pull/39470
      NIX_CFLAGS_COMPILE = toString [ "-Wno-stringop-truncation" ];
    };

    patches = [
      "${gentoo-patches}/0002-systemlib-Latest-absl-LTS-has-split-cord-libs.patch"
      "${gentoo-patches}/0005-systemlib-Updates-for-Abseil-20220623-LTS.patch"
@@ -453,9 +458,6 @@ let
      sed -i '/tensorboard ~=/d' tensorflow/tools/pip_package/setup.py
    '';

    # https://github.com/tensorflow/tensorflow/pull/39470
    env.NIX_CFLAGS_COMPILE = toString [ "-Wno-stringop-truncation" ];

    preConfigure =
      let
        opt_flags =