This is done by default by the go/rust/bazel builders and allows scripts/tools/users
to inspect the dependencies; since tensorflow is wrapped as a python package, we
should pass this through for consistency.
flat hashes can be substituted through hashed-mirrors, while recursive
hashes can’t. This is especially important for Bazel since the bazel
fetch dependencies can come from multiple different methods (git,
http, ftp, etc.). To do this, we create tar archives from the
output/external directory, which is then extracted to build. All of
the Bazel hashes are all updated.
Major breaking change from 1.x, so treating keeping both versions for now.
(adapted from 33f11be707e39acf96423f97f3baa80d8f11a0cb)
(adapted from 9e8dea7986dbdde850a58c7704182776642d8919)
This allows us to get rid of the compatibility hacks that we had to add
(tf-1.15-bazel-1.0.patch) and also fixes#77626.
(cherry picked from commit c7adb4ee7282672c330b2f8b37ac5f6d74e1a523)
They always can be regenerated during the actual build, and they are sometimes
random, e.g in Tensorflow;
platforms -> NIX_BUILD_TOP/tmp/install/35282f5123611afa742331368e9ae529/_embedded_binaries/platforms
This merges work done by yorickvP and timokau in #63208 and #63616 respectively.
Now the derivation builds both libtensorflow and the Python package and puts them into
different outputs.
Quite a bit of improvements were done on the top, including:
* Use official tag revision as source, not a branch;
* Use all system libraries possible (before only one was actually used);
* Move various environment variables to the derivation itself from hooks;
* Use source Python build instead of wheel build to ensure fixup hooks do their important jobs on libraries;
* And more that I forgot!
Drop `python.majorVersion`. For Python language version, use `python.pythonVersion`.
For implementation version, use `python.sourceVersion`.
Some expressions were broken. Those that were identified were fixed.
fixup major
Upstream lists tensorboard as a utility from tensorflow despite it
being provided by tensorboard to stop pip for deleting it. This
causes python.withPackages collisions between the two.