From 5e7a1cf955e43e1fa3c1c157c0d6961e1bcf9801 Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 27 Aug 2014 10:48:26 +0200 Subject: build-support: Fix nix-prefetch-* on OS X. Fixes a regression on OS X introduced by f83af95. Don't use --tmpdir for mktemp, because that flag doesn't exist on OS X. However, using -t is deprecated in GNU coreutils, so as suggested by @ip1981 we're now using parameter expansion on ${TMPDIR:-/tmp} to provide /tmp as a fallback if TMPDIR is not set and use it instead. Also use this approach for nix-prefetch-cvs now in order to stay consistent. Reported-by: Vladimir Kirillov Tested-by: Igor Pashev Signed-off-by: aszlig --- pkgs/build-support/fetchbzr/nix-prefetch-bzr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/build-support/fetchbzr') diff --git a/pkgs/build-support/fetchbzr/nix-prefetch-bzr b/pkgs/build-support/fetchbzr/nix-prefetch-bzr index 346c2b05cbdd..8143fca7025d 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" -- cgit 1.4.1