summary refs log tree commit diff
path: root/pkgs/build-support/wrapper-common
diff options
context:
space:
mode:
authorTyson Whitehead <twhitehead@gmail.com>2020-07-20 17:46:08 -0400
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2020-09-04 19:58:46 +0200
commitfb777be7d2925ec0e97783ce5e3a0136361dc0a8 (patch)
treef5630649da037b522038d5b996cfba7d3ac9fb4d /pkgs/build-support/wrapper-common
parent176d5e090a42961e5c6df3e20e483606f78042e1 (diff)
Purity checking should accept $TMP and not just /tmp
Diffstat (limited to 'pkgs/build-support/wrapper-common')
-rw-r--r--pkgs/build-support/wrapper-common/utils.bash6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/build-support/wrapper-common/utils.bash b/pkgs/build-support/wrapper-common/utils.bash
index 8c4680a8e4460..ce569ac2b8c4d 100644
--- a/pkgs/build-support/wrapper-common/utils.bash
+++ b/pkgs/build-support/wrapper-common/utils.bash
@@ -69,9 +69,9 @@ badPath() {
     # directory (including the build directory).
     test \
         "$p" != "/dev/null" -a \
-        "${p:0:${#NIX_STORE}}" != "$NIX_STORE" -a \
-        "${p:0:4}" != "/tmp" -a \
-        "${p:0:${#NIX_BUILD_TOP}}" != "$NIX_BUILD_TOP"
+        "${p#${NIX_STORE}}" = "$p" -a \
+        "${p#${TMP:-/tmp}}" = "$p" -a \
+        "${p#${NIX_BUILD_TOP}}" = "$p"
 }
 
 expandResponseParams() {