From fb777be7d2925ec0e97783ce5e3a0136361dc0a8 Mon Sep 17 00:00:00 2001 From: Tyson Whitehead Date: Mon, 20 Jul 2020 17:46:08 -0400 Subject: [PATCH] Purity checking should accept $TMP and not just /tmp --- pkgs/build-support/wrapper-common/utils.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/wrapper-common/utils.bash b/pkgs/build-support/wrapper-common/utils.bash index 8c4680a8e44..ce569ac2b8c 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() {