1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-19 03:48:57 +00:00
nixpkgs/pkgs/build-support/fetchdarcs/default.nix
2018-01-10 11:18:44 -05:00

20 lines
470 B
Nix

{stdenvNoCC, darcs, nix, cacert}:
{url, rev ? null, context ? null, md5 ? "", sha256 ? ""}:
if md5 != "" then
throw "fetchdarcs does not support md5 anymore, please use sha256"
else
stdenvNoCC.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;
}