Merge pull request #80953 from andir/bazel-poison

buildBazelPackage: poison all the fixed output derivations
This commit is contained in:
Andreas Rammhold 2020-03-03 10:39:05 +01:00 committed by GitHub
commit 846f300511
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 49 additions and 9 deletions

View File

@ -76,7 +76,7 @@ in buildBazelPackage rec {
rm -f "$bazelOut"/java.log "$bazelOut"/java.log.*
'';
sha256 = "122qk6iv8hd7g2a84y9aqqhij4r0m47vpxzbqhhh6k5livc73qd6";
sha256 = "1bn7nhv5pag8fdm8l8nvgg3fzvhpy2yv9yl2slrb16lckxzha3v6";
};
buildAttrs = {

View File

@ -122,6 +122,8 @@ in stdenv.mkDerivation (fBuildAttrs // {
cp -r $bazelOut/external $out
echo '${bazel.name}' > $out/.nix-bazel-version
runHook postInstall
'';
@ -143,6 +145,14 @@ in stdenv.mkDerivation (fBuildAttrs // {
preConfigure = ''
mkdir -p "$bazelOut"
test "${bazel.name}" = "$(<$deps/.nix-bazel-version)" || {
echo "fixed output derivation was built for a different bazel version" >&2
echo " got: $(<$deps/.nix-bazel-version)" >&2
echo "expected: ${bazel.name}" >&2
exit 1
}
cp -r $deps $bazelOut/external
chmod -R +w $bazelOut
find $bazelOut -type l | while read symlink; do

View File

@ -36,7 +36,7 @@ let
bazelTarget = ":install";
fetchAttrs = {
sha256 = "0mxma7jajm42v1hv6agl909xra0azihj588032ivhlmmh403x6wg";
sha256 = "0wb2gh9ji8bgq4s9ci9x017dybxqzjhncpw33b1wjksm2yhbkvlz";
};
bazelFlags = [

View File

@ -0,0 +1,27 @@
{ stdenv, fetchPypi, buildPythonPackage
, numpy
, absl-py
, mock
}:
buildPythonPackage rec {
pname = "tensorflow-estimator";
version = "1.15.1";
format = "wheel";
src = fetchPypi {
pname = "tensorflow_estimator";
inherit version format;
sha256 = "1fc61wmc0w22frs79j2x4g6wnv5g21xc6rix1g4bsvy9qfvvylw8";
};
propagatedBuildInputs = [ mock numpy absl-py ];
meta = with stdenv.lib; {
description = "TensorFlow Estimator is a high-level API that encapsulates model training, evaluation, prediction, and exporting.";
homepage = http://tensorflow.org;
license = licenses.asl20;
maintainers = with maintainers; [ jyp ];
};
}

View File

@ -42,7 +42,7 @@ let
bazelTarget = ":pip_pkg";
fetchAttrs = {
sha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5";
sha256 = "0135nxxvkmjzpd80r1g9fdkk9h62g0xlvp32g5zgk0hkma5kq0bx";
};
buildAttrs = {

View File

@ -7,7 +7,7 @@
, future, setuptools, wheel, keras-preprocessing, keras-applications, google-pasta
, functools32
, opt-einsum
, termcolor, grpcio, six, wrapt, protobuf, tensorflow-estimator
, termcolor, grpcio, six, wrapt, protobuf, tensorflow-estimator_1_15_1
# Common deps
, git, swig, which, binutils, glibcLocales, cython
# Common libraries
@ -296,10 +296,12 @@ let
TF_SYSTEM_LIBS = null;
# cudaSupport causes fetch of ncclArchive, resulting in different hashes
# FIXME: can't (re)produce this output with current bazel.
# FIXME: build log: https://gist.github.com/andir/eff3e9c8eda5b56c8ea84903aed9cc35
sha256 = if cudaSupport then
"1p544yk7jcspgc4qr4amw11ds16c2an5yxvagx5pmwawz0s083pf"
"0gyhjvzshgj59mbns8njlfl9qpz4sdg4j0xs2dva0w2nql7cr7im"
else
"1dqbw3k3avqiy9xpgs44l6z65ab5rjjlxwig8z7gcl7fw9h6sbq9";
"04jvg3mc2si4xdbszc1vnw1rmf22p7snbjphmnklp7bc39jxkcrz";
};
buildAttrs = {
@ -374,7 +376,7 @@ in buildPythonPackage {
numpy
six
protobuf
tensorflow-estimator
tensorflow-estimator_1_15_1
termcolor
wrapt
grpcio

View File

@ -62,7 +62,7 @@ buildBazelPackage rec {
sed -e '/^FILE:@bazel_gazelle_go_repository_tools.*/d' -i $bazelOut/external/\@*.marker
'';
sha256 = "0g2y283glx2ykxxqc3vsg520a6s2w5d937wndhgpfajc5yjgiz43";
sha256 = "0cmj186n2y1g9kkdhcivmh2qvigvpnbp03m575b7hgsxi1cp3ssj";
};
buildAttrs = {

View File

@ -64,7 +64,7 @@ buildBazelPackage rec {
sed -e '/^FILE:@bazel_gazelle_go_repository_tools.*/d' -i $bazelOut/external/\@*.marker
'';
sha256 = "1n66hg1w5jv2rc8q4sjlaf0agvxr713aa40mbkhgjv57x9j7bgn0";
sha256 = "0lnwc7ya6sjlx6jk5dwws166vli1lzdfc256f9g6dy1fci3sc17y";
};
buildAttrs = {

View File

@ -6659,6 +6659,7 @@ in {
zerobin = callPackage ../development/python-modules/zerobin { };
tensorflow-estimator = callPackage ../development/python-modules/tensorflow-estimator { };
tensorflow-estimator_1_15_1 = callPackage ../development/python-modules/tensorflow-estimator/1_15_1.nix { };
tensorflow-probability = callPackage ../development/python-modules/tensorflow-probability { };