fetchsvn: Allow setting the name of the output
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
da70c21cf7
commit
dddf921b51
@ -1,5 +1,5 @@
|
|||||||
{stdenv, subversion, sshSupport ? false, openssh ? null}:
|
{stdenv, subversion, sshSupport ? false, openssh ? null}:
|
||||||
{url, rev ? "HEAD", md5 ? "", sha256 ? "", ignoreExternals ? false}:
|
{url, rev ? "HEAD", md5 ? "", sha256 ? "", ignoreExternals ? false, name ? null}:
|
||||||
|
|
||||||
let
|
let
|
||||||
repoName = with stdenv.lib;
|
repoName = with stdenv.lib;
|
||||||
@ -18,10 +18,12 @@ let
|
|||||||
else if snd path == "tags" then "${trd path}-${fst path}"
|
else if snd path == "tags" then "${trd path}-${fst path}"
|
||||||
# ../repo (no trunk) -> repo
|
# ../repo (no trunk) -> repo
|
||||||
else fst path;
|
else fst path;
|
||||||
|
|
||||||
|
name_ = if name == null then "${repoName}-r${toString rev}" else name;
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "${repoName}-r${toString rev}";
|
name = name_;
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
buildInputs = [subversion];
|
buildInputs = [subversion];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user