diff options
author | Nikolay Amiantov <ab@fmap.me> | 2019-08-19 11:21:37 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2019-08-19 11:23:17 +0300 |
commit | 3b3618ea3c8c29c65855681ce51b10a447264d0d (patch) | |
tree | c1d03068ad91cdbb486db9cee9684f032ed615ef | |
parent | c9d957afc181f41eeec5c218a156db32bb20e433 (diff) | |
download | nixlib-3b3618ea3c8c29c65855681ce51b10a447264d0d.tar nixlib-3b3618ea3c8c29c65855681ce51b10a447264d0d.tar.gz nixlib-3b3618ea3c8c29c65855681ce51b10a447264d0d.tar.bz2 nixlib-3b3618ea3c8c29c65855681ce51b10a447264d0d.tar.lz nixlib-3b3618ea3c8c29c65855681ce51b10a447264d0d.tar.xz nixlib-3b3618ea3c8c29c65855681ce51b10a447264d0d.tar.zst nixlib-3b3618ea3c8c29c65855681ce51b10a447264d0d.zip |
buildBazelPackage: remove top-level symlinks
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
-rw-r--r-- | pkgs/build-support/build-bazel-package/default.nix | 9 | ||||
-rw-r--r-- | pkgs/development/python-modules/tensorflow/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/tools/bazel-watcher/default.nix | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/build-support/build-bazel-package/default.nix b/pkgs/build-support/build-bazel-package/default.nix index 32cec42160f8..d4318b715ba3 100644 --- a/pkgs/build-support/build-bazel-package/default.nix +++ b/pkgs/build-support/build-bazel-package/default.nix @@ -71,6 +71,15 @@ in stdenv.mkDerivation (fBuildAttrs // { rm -rf $(find $bazelOut/external -type d -name .svn) rm -rf $(find $bazelOut/external -type d -name .hg) + # Removing top-level symlinks along with their markers. + # This is needed because they sometimes point to temporary paths (?). + # For example, in Tensorflow-gpu build: + # platforms -> NIX_BUILD_TOP/tmp/install/35282f5123611afa742331368e9ae529/_embedded_binaries/platforms + find $bazelOut/external -maxdepth 1 -type l | while read symlink; do + name="$(basename "$symlink")" + rm "$symlink" "$bazelOut/external/@$name.marker" + done + # Patching symlinks to remove build directory reference find $bazelOut/external -type l | while read symlink; do new_target="$(readlink "$symlink" | sed "s,$NIX_BUILD_TOP,NIX_BUILD_TOP,")" diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index 43134fb746d8..70488a0d9dcb 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -267,9 +267,9 @@ let # cudaSupport causes fetch of ncclArchive, resulting in different hashes sha256 = if cudaSupport then - "1rbzvir569ch33bpvm47byx954vr80rjnzrbgs4rg3bqww73hr3k" + "19ll3f1i5qzd7ngz3m2jbxzgcrdjx5sv6kv2j5mcb8g3xsws8j5x" else - "1wnhma450zh72raiq7ddd9lyq3a056cjqiy6i7y4sidiy09ncvcg"; + "0y9kw3k4yvrxwdy7zry7nip9mdiwyv35r6mx65g4w7qajiypfc7i"; }; buildAttrs = { diff --git a/pkgs/development/tools/bazel-watcher/default.nix b/pkgs/development/tools/bazel-watcher/default.nix index 51aeebb82e52..62ecc47b17bd 100644 --- a/pkgs/development/tools/bazel-watcher/default.nix +++ b/pkgs/development/tools/bazel-watcher/default.nix @@ -62,7 +62,7 @@ buildBazelPackage rec { sed -e '/^FILE:@bazel_gazelle_go_repository_tools.*/d' -i $bazelOut/external/\@*.marker ''; - sha256 = "1i3b6kn9kq70a34wkpm8zjqj1skawdxs3r01b7r6ws1rbdnfj6mp"; + sha256 = "0g2y283glx2ykxxqc3vsg520a6s2w5d937wndhgpfajc5yjgiz43"; }; buildAttrs = { |