summary refs log tree commit diff
path: root/pkgs/build-support/fetchdarcs/default.nix
blob: 60b374e343b9982f83767d35850642185ff0757b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{stdenv, darcs, nix, cacert}:

{url, rev ? null, context ? null, md5 ? "", sha256 ? ""}:

if md5 != "" then
  throw "fetchdarcs does not support md5 anymore, please use sha256"
else
stdenv.mkDerivation {
  name = "fetchdarcs";
  NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
  builder = ./builder.sh;
  nativeBuildInputs = [darcs];

  outputHashAlgo = "sha256";
  outputHashMode = "recursive";
  outputHash = sha256;

  inherit url rev context;
}