2018-01-09 23:38:19 +00:00
|
|
|
{stdenvNoCC, mercurial, nix}: {name ? null, url, rev ? null, md5 ? null, sha256 ? null, fetchSubrepos ? false}:
|
2007-09-04 13:45:00 +01:00
|
|
|
|
2017-03-13 12:31:44 +00:00
|
|
|
if md5 != null then
|
|
|
|
throw "fetchhg does not support md5 anymore, please use sha256"
|
|
|
|
else
|
2009-11-14 20:14:21 +00:00
|
|
|
# TODO: statically check if mercurial as the https support if the url starts woth https.
|
2018-01-09 23:38:19 +00:00
|
|
|
stdenvNoCC.mkDerivation {
|
2012-12-28 18:54:15 +00:00
|
|
|
name = "hg-archive" + (if name != null then "-${name}" else "");
|
2007-09-04 13:45:00 +01:00
|
|
|
builder = ./builder.sh;
|
2018-01-09 20:36:14 +00:00
|
|
|
nativeBuildInputs = [mercurial];
|
2007-09-04 13:45:00 +01:00
|
|
|
|
2018-01-09 23:38:19 +00:00
|
|
|
impureEnvVars = stdenvNoCC.lib.fetchers.proxyImpureEnvVars;
|
2015-04-28 21:35:39 +01:00
|
|
|
|
2015-04-01 15:02:07 +01:00
|
|
|
subrepoClause = if fetchSubrepos then "S" else "";
|
|
|
|
|
2017-03-13 12:31:44 +00:00
|
|
|
outputHashAlgo = "sha256";
|
2007-09-04 13:45:00 +01:00
|
|
|
outputHashMode = "recursive";
|
2017-03-13 12:31:44 +00:00
|
|
|
outputHash = sha256;
|
2015-04-28 21:35:39 +01:00
|
|
|
|
2014-06-28 19:33:28 +01:00
|
|
|
inherit url rev;
|
2012-01-10 06:41:44 +00:00
|
|
|
preferLocalBuild = true;
|
2007-09-04 13:45:00 +01:00
|
|
|
}
|