Allow not-that-shallow git fetches; enable it for uzbl

svn path=/nixpkgs/trunk/; revision=17980
This commit is contained in:
Michael Raskin
2009-10-27 19:52:01 +00:00
parent a7261348d8
commit cd04c58fe2
5 changed files with 8 additions and 5 deletions

View File

@@ -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

View File

@@ -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