2014-06-28 22:33:28 +04:00
|
|
|
{stdenv, darcs, nix}: {url, rev ? null, context ? null, md5 ? "", sha256 ? ""}:
|
2006-01-30 14:18:38 +03:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "fetchdarcs";
|
|
|
|
builder = ./builder.sh;
|
2009-05-13 23:02:23 +04:00
|
|
|
buildInputs = [darcs];
|
2006-01-30 14:18:38 +03:00
|
|
|
|
2009-05-13 23:02:23 +04:00
|
|
|
outputHashAlgo = if sha256 == "" then "md5" else "sha256";
|
2006-01-30 14:18:38 +03:00
|
|
|
outputHashMode = "recursive";
|
2016-10-08 01:24:10 +03:00
|
|
|
outputHash = if sha256 == "" then
|
|
|
|
(stdenv.lib.fetchMD5warn "fetchdarcs" url md5) else sha256;
|
2006-01-30 14:18:38 +03:00
|
|
|
|
2014-06-28 22:33:28 +04:00
|
|
|
inherit url rev context;
|
2006-01-30 14:18:38 +03:00
|
|
|
}
|