diff --git a/pkgs/build-support/fetchbzr/nix-prefetch-bzr b/pkgs/build-support/fetchbzr/nix-prefetch-bzr index 346c2b05cbd..8143fca7025 100755 --- a/pkgs/build-support/fetchbzr/nix-prefetch-bzr +++ b/pkgs/build-support/fetchbzr/nix-prefetch-bzr @@ -43,7 +43,7 @@ fi # If we don't know the hash or a path with that hash doesn't exist, # download the file and add it to the store. if test -z "$finalPath"; then - tmpPath="$(mktemp --tmpdir -d bzr-checkout-tmp-XXXXXXXX)" + tmpPath="$(mktemp -d "${TMPDIR:-/tmp}/bzr-checkout-tmp-XXXXXXXX")" trap "rm -rf \"$tmpPath\"" EXIT tmpFile="$tmpPath/$dstFile" diff --git a/pkgs/build-support/fetchcvs/nix-prefetch-cvs b/pkgs/build-support/fetchcvs/nix-prefetch-cvs index 29e0d29b52e..f9ed8ffa066 100755 --- a/pkgs/build-support/fetchcvs/nix-prefetch-cvs +++ b/pkgs/build-support/fetchcvs/nix-prefetch-cvs @@ -20,7 +20,7 @@ fi mkTempDir() { - tmpPath=$(mktemp -d -t nix-prefetch-cvs-XXXXXXXX) + tmpPath="$(mktemp -d "${TMPDIR:-/tmp}/nix-prefetch-cvs-XXXXXXXX")" trap removeTempDir EXIT SIGINT SIGQUIT } diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 0d2536e225c..4f9dd2ac272 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -256,7 +256,7 @@ else # download the file and add it to the store. if test -z "$finalPath"; then - tmpPath="$(mktemp --tmpdir -d git-checkout-tmp-XXXXXXXX)" + tmpPath="$(mktemp -d "${TMPDIR:-/tmp}/git-checkout-tmp-XXXXXXXX")" trap "rm -rf \"$tmpPath\"" EXIT tmpFile="$tmpPath/git-export" diff --git a/pkgs/build-support/fetchhg/nix-prefetch-hg b/pkgs/build-support/fetchhg/nix-prefetch-hg index 7d4c0c8d741..a8916176f8a 100755 --- a/pkgs/build-support/fetchhg/nix-prefetch-hg +++ b/pkgs/build-support/fetchhg/nix-prefetch-hg @@ -35,7 +35,7 @@ fi # download the file and add it to the store. if test -z "$finalPath"; then - tmpPath="$(mktemp --tmpdir -d hg-checkout-tmp-XXXXXXXX)" + tmpPath="$(mktemp -d "${TMPDIR:-/tmp}/hg-checkout-tmp-XXXXXXXX")" trap "rm -rf \"$tmpPath\"" EXIT tmpArchive="$tmpPath/hg-archive" diff --git a/pkgs/build-support/fetchsvn/nix-prefetch-svn b/pkgs/build-support/fetchsvn/nix-prefetch-svn index 74de0a14c80..03b9eb9a03d 100755 --- a/pkgs/build-support/fetchsvn/nix-prefetch-svn +++ b/pkgs/build-support/fetchsvn/nix-prefetch-svn @@ -41,7 +41,7 @@ fi # If we don't know the hash or a path with that hash doesn't exist, # download the file and add it to the store. if test -z "$finalPath"; then - tmpPath="$(mktemp --tmpdir -d svn-checkout-tmp-XXXXXXXX)" + tmpPath="$(mktemp -d "${TMPDIR:-/tmp}/svn-checkout-tmp-XXXXXXXX")" trap "rm -rf \"$tmpPath\"" EXIT tmpFile="$tmpPath/$dstFile"