diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2009-10-27 19:52:01 +0000 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2009-10-27 19:52:01 +0000 |
commit | cd04c58fe224294582069eb5e40f0ab2b581d014 (patch) | |
tree | 1f63481f1581206349b9a0c79bbc7fd4f24053ce | |
parent | a7261348d8b7b81f516d69b492bf5b878e49d1c4 (diff) |
Allow not-that-shallow git fetches; enable it for uzbl
svn path=/nixpkgs/trunk/; revision=17980
5 files changed, 8 insertions, 5 deletions
diff --git a/pkgs/applications/networking/browsers/uzbl/src-for-experimental.nix b/pkgs/applications/networking/browsers/uzbl/src-for-experimental.nix index 6866b48951679..7ee83fe5fecea 100644 --- a/pkgs/applications/networking/browsers/uzbl/src-for-experimental.nix +++ b/pkgs/applications/networking/browsers/uzbl/src-for-experimental.nix @@ -5,5 +5,6 @@ rec { rev="847ddc83ccbd7964898980f3f4dd520937ea3bbe"; url="git://github.com/Dieterbe/uzbl.git"; + depth="100"; } diff --git a/pkgs/applications/networking/browsers/uzbl/src-info-for-experimental.nix b/pkgs/applications/networking/browsers/uzbl/src-info-for-experimental.nix index 60750f7b90bed..f2004980d5999 100644 --- a/pkgs/applications/networking/browsers/uzbl/src-info-for-experimental.nix +++ b/pkgs/applications/networking/browsers/uzbl/src-info-for-experimental.nix @@ -3,4 +3,6 @@ baseName = "uzbl-experimental"; method = "fetchgit"; rev = "origin/experimental"; + extraVars = "depth"; + eval_depth = "depth=50"; } diff --git a/pkgs/build-support/builder-defs/builder-defs.nix b/pkgs/build-support/builder-defs/builder-defs.nix index 814ce460794c4..fe4b16374a3d2 100644 --- a/pkgs/build-support/builder-defs/builder-defs.nix +++ b/pkgs/build-support/builder-defs/builder-defs.nix @@ -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 diff --git a/pkgs/build-support/fetchgit/builder.sh b/pkgs/build-support/fetchgit/builder.sh index e43a2e37726c4..83a3157b498f6 100644 --- a/pkgs/build-support/fetchgit/builder.sh +++ b/pkgs/build-support/fetchgit/builder.sh @@ -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 diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix index 3193057f32155..b8517245d28b3 100644 --- a/pkgs/build-support/fetchgit/default.nix +++ b/pkgs/build-support/fetchgit/default.nix @@ -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 |