forked from mirrors/nixpkgs
Allow not-that-shallow git fetches; enable it for uzbl
svn path=/nixpkgs/trunk/; revision=17980
This commit is contained in:
parent
a7261348d8
commit
cd04c58fe2
|
@ -5,5 +5,6 @@ rec {
|
|||
rev="847ddc83ccbd7964898980f3f4dd520937ea3bbe";
|
||||
url="git://github.com/Dieterbe/uzbl.git";
|
||||
|
||||
depth="100";
|
||||
|
||||
}
|
||||
|
|
|
@ -3,4 +3,6 @@
|
|||
baseName = "uzbl-experimental";
|
||||
method = "fetchgit";
|
||||
rev = "origin/experimental";
|
||||
extraVars = "depth";
|
||||
eval_depth = "depth=50";
|
||||
}
|
||||
|
|
|
@ -546,11 +546,11 @@ let inherit (builtins) head tail trace; in
|
|||
sha256 = srcInfo.hash;
|
||||
};
|
||||
|
||||
fetchGitFromSrcInfo = srcInfo: fetchgit {
|
||||
fetchGitFromSrcInfo = srcInfo: fetchgit ({
|
||||
url = srcInfo.url;
|
||||
rev = srcInfo.rev;
|
||||
sha256 = srcInfo.hash;
|
||||
};
|
||||
} // (if srcInfo ? depth then {inherit (srcInfo) depth;} else {}));
|
||||
}) // args
|
||||
|
||||
# [1]: rewrite using '' instead of " so that indentation gets stripped. It's
|
||||
|
|
|
@ -2,7 +2,7 @@ source $stdenv/setup
|
|||
|
||||
header "exporting $url (rev $rev) into $out"
|
||||
|
||||
git clone --depth 1 "$url" $out
|
||||
git clone --depth "$depth" "$url" $out
|
||||
if test -n "$rev"; then
|
||||
cd $out
|
||||
git checkout $rev
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{stdenv, git}:
|
||||
{url, rev ? "HEAD", md5 ? "", sha256 ? ""}:
|
||||
{url, rev ? "HEAD", md5 ? "", sha256 ? "", depth ? 1}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "git-export";
|
||||
|
@ -10,7 +10,7 @@ stdenv.mkDerivation {
|
|||
outputHashMode = "recursive";
|
||||
outputHash = if sha256 == "" then md5 else sha256;
|
||||
|
||||
inherit url rev ;
|
||||
inherit url rev depth;
|
||||
|
||||
impureEnvVars = [
|
||||
# We borrow these environment variables from the caller to allow
|
||||
|
|
Loading…
Reference in a new issue