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
pkgs
applications/networking/browsers/uzbl
build-support
|
@ -5,5 +5,6 @@ rec {
|
||||||
rev="847ddc83ccbd7964898980f3f4dd520937ea3bbe";
|
rev="847ddc83ccbd7964898980f3f4dd520937ea3bbe";
|
||||||
url="git://github.com/Dieterbe/uzbl.git";
|
url="git://github.com/Dieterbe/uzbl.git";
|
||||||
|
|
||||||
|
depth="100";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,4 +3,6 @@
|
||||||
baseName = "uzbl-experimental";
|
baseName = "uzbl-experimental";
|
||||||
method = "fetchgit";
|
method = "fetchgit";
|
||||||
rev = "origin/experimental";
|
rev = "origin/experimental";
|
||||||
|
extraVars = "depth";
|
||||||
|
eval_depth = "depth=50";
|
||||||
}
|
}
|
||||||
|
|
|
@ -546,11 +546,11 @@ let inherit (builtins) head tail trace; in
|
||||||
sha256 = srcInfo.hash;
|
sha256 = srcInfo.hash;
|
||||||
};
|
};
|
||||||
|
|
||||||
fetchGitFromSrcInfo = srcInfo: fetchgit {
|
fetchGitFromSrcInfo = srcInfo: fetchgit ({
|
||||||
url = srcInfo.url;
|
url = srcInfo.url;
|
||||||
rev = srcInfo.rev;
|
rev = srcInfo.rev;
|
||||||
sha256 = srcInfo.hash;
|
sha256 = srcInfo.hash;
|
||||||
};
|
} // (if srcInfo ? depth then {inherit (srcInfo) depth;} else {}));
|
||||||
}) // args
|
}) // args
|
||||||
|
|
||||||
# [1]: rewrite using '' instead of " so that indentation gets stripped. It's
|
# [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"
|
header "exporting $url (rev $rev) into $out"
|
||||||
|
|
||||||
git clone --depth 1 "$url" $out
|
git clone --depth "$depth" "$url" $out
|
||||||
if test -n "$rev"; then
|
if test -n "$rev"; then
|
||||||
cd $out
|
cd $out
|
||||||
git checkout $rev
|
git checkout $rev
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{stdenv, git}:
|
{stdenv, git}:
|
||||||
{url, rev ? "HEAD", md5 ? "", sha256 ? ""}:
|
{url, rev ? "HEAD", md5 ? "", sha256 ? "", depth ? 1}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "git-export";
|
name = "git-export";
|
||||||
|
@ -10,7 +10,7 @@ stdenv.mkDerivation {
|
||||||
outputHashMode = "recursive";
|
outputHashMode = "recursive";
|
||||||
outputHash = if sha256 == "" then md5 else sha256;
|
outputHash = if sha256 == "" then md5 else sha256;
|
||||||
|
|
||||||
inherit url rev ;
|
inherit url rev depth;
|
||||||
|
|
||||||
impureEnvVars = [
|
impureEnvVars = [
|
||||||
# We borrow these environment variables from the caller to allow
|
# We borrow these environment variables from the caller to allow
|
||||||
|
|
Loading…
Reference in a new issue