fetchfossil: Cleanup some copy-and-paste.

This commit is contained in:
Corbin 2016-08-19 07:34:58 -07:00
parent 23a50ca407
commit 7880bc0c21

View File

@ -2,15 +2,14 @@
{name ? null, url, rev ? null, md5 ? null, sha256 ? null}:
# TODO: statically check if mercurial as the https support if the url starts woth https.
stdenv.mkDerivation {
name = "fossil-archive" + (if name != null then "-${name}" else "");
builder = ./builder.sh;
buildInputs = [fossil];
impureEnvVars = [
"http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy"
];
# Envvar docs are hard to find. A link for the future:
# https://www.fossil-scm.org/index.html/doc/trunk/www/env-opts.md
impureEnvVars = [ "http_proxy" ];
outputHashAlgo = if md5 != null then "md5" else "sha256";
outputHashMode = "recursive";