summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2014-08-30 10:04:02 +0200
committerVladimír Čunát <vcunat@gmail.com>2014-08-30 10:04:02 +0200
commite51f73652d38d5c53b331b7bcae2e2483e1b8afe (patch)
tree9126d3fd0737db3a0d57cda866d96c377fc0e452 /pkgs/build-support
parenta283bec71cec60c2b9c84ea9af320fc8df0dfd5f (diff)
parent4e0d2706f174bb893378a8241df7bd2055901b9e (diff)
downloadnixlib-e51f73652d38d5c53b331b7bcae2e2483e1b8afe.tar
nixlib-e51f73652d38d5c53b331b7bcae2e2483e1b8afe.tar.gz
nixlib-e51f73652d38d5c53b331b7bcae2e2483e1b8afe.tar.bz2
nixlib-e51f73652d38d5c53b331b7bcae2e2483e1b8afe.tar.lz
nixlib-e51f73652d38d5c53b331b7bcae2e2483e1b8afe.tar.xz
nixlib-e51f73652d38d5c53b331b7bcae2e2483e1b8afe.tar.zst
nixlib-e51f73652d38d5c53b331b7bcae2e2483e1b8afe.zip
Merge recent master into staging
Hydra: ?compare=1149952

Conflicts:
	nixos/doc/manual/configuration.xml (changed split file)
	nixos/modules/config/users-groups.nix (choosing filterNull instead of inline definition)
	pkgs/development/libraries/readline/readline6.3.nix (auto-solved)
Diffstat (limited to 'pkgs/build-support')
-rwxr-xr-xpkgs/build-support/fetchbzr/nix-prefetch-bzr7
-rwxr-xr-xpkgs/build-support/fetchcvs/nix-prefetch-cvs2
-rwxr-xr-xpkgs/build-support/fetchgit/nix-prefetch-git10
-rwxr-xr-xpkgs/build-support/fetchhg/nix-prefetch-hg7
-rwxr-xr-xpkgs/build-support/fetchsvn/nix-prefetch-svn7
5 files changed, 15 insertions, 18 deletions
diff --git a/pkgs/build-support/fetchbzr/nix-prefetch-bzr b/pkgs/build-support/fetchbzr/nix-prefetch-bzr
index 2f46819323f2..8143fca7025d 100755
--- a/pkgs/build-support/fetchbzr/nix-prefetch-bzr
+++ b/pkgs/build-support/fetchbzr/nix-prefetch-bzr
@@ -43,11 +43,10 @@ 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=/tmp/bzr-checkout-tmp-$$
-    tmpFile=$tmpPath/$dstFile
-    mkdir $tmpPath
+    tmpPath="$(mktemp -d "${TMPDIR:-/tmp}/bzr-checkout-tmp-XXXXXXXX")"
+    trap "rm -rf \"$tmpPath\"" EXIT
 
-    trap "rm -rf $tmpPath" EXIT
+    tmpFile="$tmpPath/$dstFile"
 
     # Perform the checkout.
     bzr -Ossl.cert_reqs=none export $revarg --format=dir "$tmpFile" "$url"
diff --git a/pkgs/build-support/fetchcvs/nix-prefetch-cvs b/pkgs/build-support/fetchcvs/nix-prefetch-cvs
index 29e0d29b52e9..f9ed8ffa066f 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 fcb012627834..4f9dd2ac272b 100755
--- a/pkgs/build-support/fetchgit/nix-prefetch-git
+++ b/pkgs/build-support/fetchgit/nix-prefetch-git
@@ -219,7 +219,7 @@ clone_user_rev() {
 
     local full_revision=$(cd $dir && (git rev-parse $rev 2> /dev/null || git rev-parse refs/heads/fetchgit) | tail -n1)
     echo "git revision is $full_revision"
-    echo "git human-readable version is $(cd $dir && (git describe $full_revision 2> /dev/null || git describe --tags $full_revision 2> /dev/null || echo -- none --))"
+    echo "git human-readable version is $(cd $dir && (git describe $full_revision 2> /dev/null || git describe --tags $full_revision 2> /dev/null || echo -- none --))" >&2
 
     # Allow doing additional processing before .git removal
     eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK"
@@ -256,11 +256,11 @@ else
   # download the file and add it to the store.
   if test -z "$finalPath"; then
 
-      tmpPath=/tmp/git-checkout-tmp-$$
-      tmpFile=$tmpPath/git-export
-      mkdir $tmpPath $tmpFile
+      tmpPath="$(mktemp -d "${TMPDIR:-/tmp}/git-checkout-tmp-XXXXXXXX")"
+      trap "rm -rf \"$tmpPath\"" EXIT
 
-      trap "rm -rf $tmpPath" EXIT
+      tmpFile="$tmpPath/git-export"
+      mkdir "$tmpFile"
 
       # Perform the checkout.
       clone_user_rev "$tmpFile" "$url" "$rev"
diff --git a/pkgs/build-support/fetchhg/nix-prefetch-hg b/pkgs/build-support/fetchhg/nix-prefetch-hg
index 075dbc9c367b..a8916176f8af 100755
--- a/pkgs/build-support/fetchhg/nix-prefetch-hg
+++ b/pkgs/build-support/fetchhg/nix-prefetch-hg
@@ -35,11 +35,10 @@ fi
 # download the file and add it to the store.
 if test -z "$finalPath"; then
 
-    tmpPath=/tmp/hg-checkout-tmp-$$
-    tmpArchive=$tmpPath/hg-archive
-    mkdir $tmpPath
+    tmpPath="$(mktemp -d "${TMPDIR:-/tmp}/hg-checkout-tmp-XXXXXXXX")"
+    trap "rm -rf \"$tmpPath\"" EXIT
 
-    trap "rm -rf $tmpPath" EXIT
+    tmpArchive="$tmpPath/hg-archive"
 
     # Perform the checkout.
     if [[ $url != /* ]]; then
diff --git a/pkgs/build-support/fetchsvn/nix-prefetch-svn b/pkgs/build-support/fetchsvn/nix-prefetch-svn
index a2ee3ac6052f..03b9eb9a03df 100755
--- a/pkgs/build-support/fetchsvn/nix-prefetch-svn
+++ b/pkgs/build-support/fetchsvn/nix-prefetch-svn
@@ -41,11 +41,10 @@ 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=/tmp/svn-checkout-tmp-$$
-    tmpFile=$tmpPath/$dstFile
-    mkdir $tmpPath
+    tmpPath="$(mktemp -d "${TMPDIR:-/tmp}/svn-checkout-tmp-XXXXXXXX")"
+    trap "rm -rf \"$tmpPath\"" EXIT
 
-    trap "rm -rf $tmpPath" EXIT
+    tmpFile="$tmpPath/$dstFile"
 
     # Perform the checkout.
     if test "$NIX_PREFETCH_SVN_LEAVE_DOT_SVN" != 1