summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support')
-rwxr-xr-xpkgs/build-support/fetchbzr/nix-prefetch-bzr2
-rwxr-xr-xpkgs/build-support/fetchgit/nix-prefetch-git2
-rwxr-xr-xpkgs/build-support/fetchhg/nix-prefetch-hg1
-rwxr-xr-xpkgs/build-support/fetchsvn/nix-prefetch-svn1
-rw-r--r--pkgs/build-support/nix-prefetch-tools/default.nix28
5 files changed, 5 insertions, 29 deletions
diff --git a/pkgs/build-support/fetchbzr/nix-prefetch-bzr b/pkgs/build-support/fetchbzr/nix-prefetch-bzr
index 9ff86c20ae3f..2f46819323f2 100755
--- a/pkgs/build-support/fetchbzr/nix-prefetch-bzr
+++ b/pkgs/build-support/fetchbzr/nix-prefetch-bzr
@@ -52,6 +52,8 @@ if test -z "$finalPath"; then
     # Perform the checkout.
     bzr -Ossl.cert_reqs=none export $revarg --format=dir "$tmpFile" "$url"
 
+    echo "bzr revision is $(bzr revno $revarg "$url")"
+
     # Compute the hash.
     hash=$(nix-hash --type $hashType $hashFormat $tmpFile)
     if ! test -n "$QUIET"; then echo "hash is $hash" >&2; fi
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git
index d4819574acb8..3574f3b7539b 100755
--- a/pkgs/build-support/fetchgit/nix-prefetch-git
+++ b/pkgs/build-support/fetchgit/nix-prefetch-git
@@ -217,7 +217,7 @@ clone_user_rev() {
             fi;;
     esac
 
-    echo "git revision is $(cd $dir && git rev-parse $rev)"
+    echo "git revision is $(cd $dir && (git rev-parse $rev 2> /dev/null || git rev-parse refs/heads/fetchgit) | tail -n1)"
 
     # Allow doing additional processing before .git removal
     eval "$NIX_PREFETCH_GIT_CHECKOUT_HOOK"
diff --git a/pkgs/build-support/fetchhg/nix-prefetch-hg b/pkgs/build-support/fetchhg/nix-prefetch-hg
index f1f648f4aeb8..075dbc9c367b 100755
--- a/pkgs/build-support/fetchhg/nix-prefetch-hg
+++ b/pkgs/build-support/fetchhg/nix-prefetch-hg
@@ -51,6 +51,7 @@ if test -z "$finalPath"; then
     hg archive -q -y -r "$rev" --cwd $tmpClone $tmpArchive
     rm -f $tmpArchive/.hg_archival.txt
 
+    echo "hg revision is $(cd $tmpClone; hg id -r "$rev" -i)"
 
     # Compute the hash.
     hash=$(nix-hash --type $hashType $hashFormat $tmpArchive)
diff --git a/pkgs/build-support/fetchsvn/nix-prefetch-svn b/pkgs/build-support/fetchsvn/nix-prefetch-svn
index 2858a0b01ab1..a2ee3ac6052f 100755
--- a/pkgs/build-support/fetchsvn/nix-prefetch-svn
+++ b/pkgs/build-support/fetchsvn/nix-prefetch-svn
@@ -56,6 +56,7 @@ if test -z "$finalPath"; then
     fi
 
     echo p | svn "$command" --quiet -r "$rev" "$url" "$tmpFile" >&2
+    echo "svn revision is $(svn info -r "$rev" "$url" | grep "Revision: " | cut -d' ' -f2)"
 
     # Compute the hash.
     hash=$(nix-hash --type $hashType $hashFormat $tmpFile)
diff --git a/pkgs/build-support/nix-prefetch-tools/default.nix b/pkgs/build-support/nix-prefetch-tools/default.nix
deleted file mode 100644
index de47b23925f0..000000000000
--- a/pkgs/build-support/nix-prefetch-tools/default.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{stdenv}:
-stdenv.mkDerivation {
-  name = "nix-prefetch-tools";
-  src = "";
-  srcRoot=".";
-  prePhases = "undefUnpack";
-  undefUnpack = ''
-    unpackPhase () { :; };
-  '';
-  installPhase = ''
-    mkdir -p $out/bin
-    cp ${../fetchbzr/nix-prefetch-bzr} $out/bin
-    cp ${../fetchcvs/nix-prefetch-cvs} $out/bin
-    cp ${../fetchgit/nix-prefetch-git} $out/bin
-    cp ${../fetchhg/nix-prefetch-hg} $out/bin
-    cp ${../fetchsvn/nix-prefetch-svn} $out/bin
-    chmod a+x $out/bin/*
-  '';
-  meta = {
-    description = ''
-      A package to include all the NixPkgs prefetchers
-    '';
-    maintainers = with stdenv.lib.maintainers; [raskin];
-    platforms = with stdenv.lib.platforms; unix;
-    # Quicker to build than to download, I hope
-    hydraPlatforms = [];
-  };
-}