fetchsvn: Allow setting the name of the output

Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
Shea Levy 2013-05-23 16:03:07 -04:00
parent da70c21cf7
commit dddf921b51

View File

@ -1,5 +1,5 @@
{stdenv, subversion, sshSupport ? false, openssh ? null}:
{url, rev ? "HEAD", md5 ? "", sha256 ? "", ignoreExternals ? false}:
{stdenv, subversion, sshSupport ? false, openssh ? null}:
{url, rev ? "HEAD", md5 ? "", sha256 ? "", ignoreExternals ? false, name ? null}:
let
repoName = with stdenv.lib;
@ -18,10 +18,12 @@ let
else if snd path == "tags" then "${trd path}-${fst path}"
# ../repo (no trunk) -> repo
else fst path;
name_ = if name == null then "${repoName}-r${toString rev}" else name;
in
stdenv.mkDerivation {
name = "${repoName}-r${toString rev}";
name = name_;
builder = ./builder.sh;
buildInputs = [subversion];