From dddf921b51e2f6e510a31958d5a14fb452b43b73 Mon Sep 17 00:00:00 2001
From: Shea Levy <shea@shealevy.com>
Date: Thu, 23 May 2013 16:03:07 -0400
Subject: [PATCH] fetchsvn: Allow setting the name of the output

Signed-off-by: Shea Levy <shea@shealevy.com>
---
 pkgs/build-support/fetchsvn/default.nix | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/pkgs/build-support/fetchsvn/default.nix b/pkgs/build-support/fetchsvn/default.nix
index 39272b996082..30625a758f8c 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 ? "", 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];