diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 9c918b12f96e..6c72395219f7 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -1069,12 +1069,12 @@ _defaultUnpack() { # disregard the error code from the xz invocation. Otherwise, # it can happen that tar exits earlier, causing xz to fail # from a SIGPIPE. - (XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; true) | tar xf - --warning=no-timestamp + (XZ_OPT="--threads=$NIX_BUILD_CORES" xz -d < "$fn"; true) | tar xf - --mode=+w --warning=no-timestamp ;; *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) # GNU tar can automatically select the decompression method # (info "(tar) gzip"). - tar xf "$fn" --warning=no-timestamp + tar xf "$fn" --mode=+w --warning=no-timestamp ;; *) return 1