From 463378f7ccd82e644737497b1af364fbeba48edc Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 26 Mar 2013 19:48:52 +0100 Subject: [PATCH] fetchsvn: Add ignoreExternals attribute. There are some SVN repositories out there which don't have revision information tied to externals. By using ignoreExternals, fetchsvn won't fetch these externals anymore, so the fetch won't fail with a checksum mismatch, should there be some changes in some of those external repositories. Signed-off-by: aszlig --- pkgs/build-support/fetchsvn/builder.sh | 3 ++- pkgs/build-support/fetchsvn/default.nix | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/fetchsvn/builder.sh b/pkgs/build-support/fetchsvn/builder.sh index 09358aa694bc..ea52ca19fa67 100644 --- a/pkgs/build-support/fetchsvn/builder.sh +++ b/pkgs/build-support/fetchsvn/builder.sh @@ -22,6 +22,7 @@ fi; # server's certificate. This is perfectly safe: we don't care # whether the server is being spoofed --- only the cryptographic # hash of the output matters. -echo 'p' | svn export -r "$rev" "$url" $out +echo 'p' | svn export ${ignoreExternals:+--ignore-externals} \ + -r "$rev" "$url" "$out" stopNest diff --git a/pkgs/build-support/fetchsvn/default.nix b/pkgs/build-support/fetchsvn/default.nix index ae8aabf858cd..39272b996082 100644 --- a/pkgs/build-support/fetchsvn/default.nix +++ b/pkgs/build-support/fetchsvn/default.nix @@ -1,5 +1,5 @@ {stdenv, subversion, sshSupport ? false, openssh ? null}: -{url, rev ? "HEAD", md5 ? "", sha256 ? ""}: +{url, rev ? "HEAD", md5 ? "", sha256 ? "", ignoreExternals ? false}: let repoName = with stdenv.lib; @@ -29,7 +29,7 @@ stdenv.mkDerivation { outputHashMode = "recursive"; outputHash = if sha256 == "" then md5 else sha256; - inherit url rev sshSupport openssh; + inherit url rev sshSupport openssh ignoreExternals; impureEnvVars = [ # We borrow these environment variables from the caller to allow