python3Packges.tensorflow: workaround buggy std::optional detection in abseil-cpp
This commit is contained in:
parent
508b7cb367
commit
c2720cebe7
|
@ -0,0 +1,15 @@
|
||||||
|
diff -ru a/absl/base/config.h b/absl/base/config.h
|
||||||
|
--- a/absl/base/config.h
|
||||||
|
+++ b/absl/base/config.h
|
||||||
|
@@ -558,9 +558,9 @@
|
||||||
|
__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 50000) || \
|
||||||
|
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && \
|
||||||
|
__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 120000))))
|
||||||
|
-#define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 1
|
||||||
|
+// #define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 1
|
||||||
|
#else
|
||||||
|
-#define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 0
|
||||||
|
+// #define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ABSL_HAVE_STD_ANY
|
|
@ -311,6 +311,8 @@ let
|
||||||
# bazel 3.3 should work just as well as bazel 3.1
|
# bazel 3.3 should work just as well as bazel 3.1
|
||||||
rm -f .bazelversion
|
rm -f .bazelversion
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
|
'' + lib.optionalString (stdenv.hostPlatform.system == "x86_64-darwin") ''
|
||||||
|
cat ${./com_google_absl_fix_macos.patch} >> third_party/absl/com_google_absl_fix_mac_and_nvcc_build.patch
|
||||||
'' + lib.optionalString (!withTensorboard) ''
|
'' + lib.optionalString (!withTensorboard) ''
|
||||||
# Tensorboard pulls in a bunch of dependencies, some of which may
|
# Tensorboard pulls in a bunch of dependencies, some of which may
|
||||||
# include security vulnerabilities. So we make it optional.
|
# include security vulnerabilities. So we make it optional.
|
||||||
|
@ -375,7 +377,7 @@ let
|
||||||
then "sha256-SudzMTxfifKJJso6haCgOD2dXeAhYSXHA2nzq1ErTHg="
|
then "sha256-SudzMTxfifKJJso6haCgOD2dXeAhYSXHA2nzq1ErTHg="
|
||||||
else "sha256-bwZwK24DlUevN5gIdKmBkq1dJpn0i2H4hq+IN77BzjE=";
|
else "sha256-bwZwK24DlUevN5gIdKmBkq1dJpn0i2H4hq+IN77BzjE=";
|
||||||
aarch64-linux = "sha256-ZbCNZSHF9of+KGTNEqFdKQ44MVNto/rTyo2XEsKXISg=";
|
aarch64-linux = "sha256-ZbCNZSHF9of+KGTNEqFdKQ44MVNto/rTyo2XEsKXISg=";
|
||||||
x86_64-darwin = "sha256-/qPUDgfKsWCZh/pgZM4wm9+4U9U5kxxv7q3Uh7zKSO4=";
|
x86_64-darwin = "sha256-ZfZQjLdqo8VVlfKfkdolvSHQvKe4IbQSLc/4cNzHr3E=";
|
||||||
aarch64-darwin = "sha256-u+ODHAZDlGe06PUWId4sNKyl60vhAPMd01jMm2EvN8E=";
|
aarch64-darwin = "sha256-u+ODHAZDlGe06PUWId4sNKyl60vhAPMd01jMm2EvN8E=";
|
||||||
}.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
|
}.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
|
||||||
};
|
};
|
||||||
|
@ -424,7 +426,7 @@ let
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = with maintainers; [ jyp abbradar ];
|
maintainers = with maintainers; [ jyp abbradar ];
|
||||||
platforms = with platforms; linux ++ darwin;
|
platforms = with platforms; linux ++ darwin;
|
||||||
broken = !(xlaSupport -> cudaSupport) || (stdenv.hostPlatform.system == "x86_64-darwin");
|
broken = !(xlaSupport -> cudaSupport);
|
||||||
} // lib.optionalAttrs stdenv.isDarwin {
|
} // lib.optionalAttrs stdenv.isDarwin {
|
||||||
timeout = 86400; # 24 hours
|
timeout = 86400; # 24 hours
|
||||||
maxSilent = 14400; # 4h, double the default of 7200s
|
maxSilent = 14400; # 4h, double the default of 7200s
|
||||||
|
|
Loading…
Reference in a new issue