summary refs log tree commit diff
path: root/pkgs/build-support/build-bazel-package
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2019-06-26 15:15:38 +0200
committerTimo Kaufmann <timokau@zoho.com>2019-06-28 22:44:20 +0200
commit255686e8fc327e9a56cbdb27f6d65f180cb168a8 (patch)
treeb501748cb0ff2516bfbea5084cbabc77f8f8df89 /pkgs/build-support/build-bazel-package
parentcc588bd420c93d0ae722e5a1d9750dc24e822bff (diff)
downloadnixpkgs-255686e8fc327e9a56cbdb27f6d65f180cb168a8.tar
nixpkgs-255686e8fc327e9a56cbdb27f6d65f180cb168a8.tar.gz
nixpkgs-255686e8fc327e9a56cbdb27f6d65f180cb168a8.tar.bz2
nixpkgs-255686e8fc327e9a56cbdb27f6d65f180cb168a8.tar.lz
nixpkgs-255686e8fc327e9a56cbdb27f6d65f180cb168a8.tar.xz
nixpkgs-255686e8fc327e9a56cbdb27f6d65f180cb168a8.tar.zst
nixpkgs-255686e8fc327e9a56cbdb27f6d65f180cb168a8.zip
bzildBazelPackage: fix fetch with no markers
Previously the installPhase of the fixed ouput derivation would fail for
a package that has no markers, since `sed` would complain about having
no input files. If we use `find` instead of bash globs, that problem
goes away.
Diffstat (limited to 'pkgs/build-support/build-bazel-package')
-rw-r--r--pkgs/build-support/build-bazel-package/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/build-support/build-bazel-package/default.nix b/pkgs/build-support/build-bazel-package/default.nix
index 1004a7ce3f9..c0ad4a6a38e 100644
--- a/pkgs/build-support/build-bazel-package/default.nix
+++ b/pkgs/build-support/build-bazel-package/default.nix
@@ -51,8 +51,10 @@ in stdenv.mkDerivation (fBuildAttrs // {
       rm -rf $bazelOut/external/{local_*,\@local_*}
 
       # Patching markers to make them deterministic
-      sed -i 's, -\?[0-9][0-9]*$, 1,' $bazelOut/external/\@*.marker
-      sed -i '/^ENV:TMP.*/d' $bazelOut/external/\@*.marker
+      find $bazelOut/external -name '@*\.marker' -exec sed -i \
+        -e 's, -\?[0-9][0-9]*$, 1,' \
+        -e '/^ENV:TMP.*/d' \
+        '{}' \;
 
       # Remove all vcs files
       rm -rf $(find $bazelOut/external -type d -name .git)