about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorWael M. Nasreddine <wael.nasreddine@gmail.com>2019-03-21 21:01:25 -0700
committerWael M. Nasreddine <wael.nasreddine@gmail.com>2019-03-21 21:01:25 -0700
commit5af0780492827a0c9525e255371f9e7df0f3bb1d (patch)
tree14bebf201b7402984908f1e5c889d8bedbfc0561 /pkgs/build-support
parent7957a93520d458727c19532c607f6d7176f78207 (diff)
parent52dae14f0c763dd48572058f0f0906166da14c31 (diff)
downloadnixlib-5af0780492827a0c9525e255371f9e7df0f3bb1d.tar
nixlib-5af0780492827a0c9525e255371f9e7df0f3bb1d.tar.gz
nixlib-5af0780492827a0c9525e255371f9e7df0f3bb1d.tar.bz2
nixlib-5af0780492827a0c9525e255371f9e7df0f3bb1d.tar.lz
nixlib-5af0780492827a0c9525e255371f9e7df0f3bb1d.tar.xz
nixlib-5af0780492827a0c9525e255371f9e7df0f3bb1d.tar.zst
nixlib-5af0780492827a0c9525e255371f9e7df0f3bb1d.zip
Merge remote-tracking branch 'origin/master' into staging
* origin/master: (693 commits)
  buildGoModule: use go_1_12 instead of go_1_11 (#58103)
  gitAndTools.lab: 0.15.2 -> 0.15.3 (#58091)
  signal-desktop: 1.22.0 -> 1.23.0
  added missing semicolon to documentation
  terminus_font_ttf: 4.46.0 -> 4.47.0
  buildGoModule: remove SSL env vars in favor of cacert in buildInputs (#58071)
  dav1d: init at 0.2.1
  dropbox-cli: 2018.11.28 -> 2019.02.14
  atlassian-confluence: 6.14.1 -> 6.14.2
  maintainers: update email for dywedir
  python.pkgs.hglib: use patch to specify hg path (#57926)
  chkrootkit: 0.52 -> 0.53
  radare2-cutter: 1.7.2 -> 1.8.0
  autorandr: 1.7 -> 1.8
  pythonPackages.pyhepmc: fix build
  llvm-polly/clang-polly: use latest llvm
  apulse: 0.1.11.1 -> 0.1.12, cleanup
  factorio: experimental 0.17.14 → 0.17.16 (#58000)
  sequeler: 0.6.7 -> 0.6.8
  nasc: 0.5.1 -> 0.5.2
  ...
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/build-bazel-package/default.nix1
-rw-r--r--pkgs/build-support/rust/default.nix3
-rw-r--r--pkgs/build-support/setup-hooks/auto-patchelf.sh11
3 files changed, 10 insertions, 5 deletions
diff --git a/pkgs/build-support/build-bazel-package/default.nix b/pkgs/build-support/build-bazel-package/default.nix
index f39f4e65e454..b0840192ecec 100644
--- a/pkgs/build-support/build-bazel-package/default.nix
+++ b/pkgs/build-support/build-bazel-package/default.nix
@@ -50,6 +50,7 @@ in stdenv.mkDerivation (fBuildAttrs // {
 
       # 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
 
       # Remove all vcs files
       rm -rf $(find $bazelOut/external -type d -name .git)
diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix
index 43aecdef5f2e..c69832a89b9f 100644
--- a/pkgs/build-support/rust/default.nix
+++ b/pkgs/build-support/rust/default.nix
@@ -1,6 +1,7 @@
 { stdenv, cacert, git, cargo, rustc, cargo-vendor, fetchcargo, python3 }:
 
-{ name, cargoSha256 ? "unset"
+{ name ? "${args.pname}-${args.version}"
+, cargoSha256 ? "unset"
 , src ? null
 , srcs ? null
 , cargoPatches ? []
diff --git a/pkgs/build-support/setup-hooks/auto-patchelf.sh b/pkgs/build-support/setup-hooks/auto-patchelf.sh
index 5bedd1a9f9ca..6af8eb1aed99 100644
--- a/pkgs/build-support/setup-hooks/auto-patchelf.sh
+++ b/pkgs/build-support/setup-hooks/auto-patchelf.sh
@@ -15,8 +15,10 @@ isExecutable() {
     # *or* there is an INTERP section. This also catches position-independent
     # executables, as they typically have an INTERP section but their ELF type
     # is DYN.
-    LANG=C readelf -h -l "$1" 2> /dev/null \
-        | grep -q '^ *Type: *EXEC\>\|^ *INTERP\>'
+    isExeResult="$(LANG=C readelf -h -l "$1" 2> /dev/null \
+        | grep '^ *Type: *EXEC\>\|^ *INTERP\>')"
+    # not using grep -q, because it can cause Broken pipe
+    [ -n "$isExeResult" ]
 }
 
 # We cache dependencies so that we don't need to search through all of them on
@@ -207,10 +209,11 @@ autoPatchelf() {
       isELF "$file" || continue
       segmentHeaders="$(LANG=C readelf -l "$file")"
       # Skip if the ELF file doesn't have segment headers (eg. object files).
-      echo "$segmentHeaders" | grep -q '^Program Headers:' || continue
+      # not using grep -q, because it can cause Broken pipe
+      [ -n "$(echo "$segmentHeaders" | grep '^Program Headers:')" ] || continue
       if isExecutable "$file"; then
           # Skip if the executable is statically linked.
-          echo "$segmentHeaders" | grep -q "^ *INTERP\\>" || continue
+          [ -n "$(echo "$segmentHeaders" | grep "^ *INTERP\\>")" ] || continue
       fi
       autoPatchelfFile "$file"
     done < <(find "$@" ${norecurse:+-maxdepth 1} -type f -print0)