mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 18:03:22 +00:00
a81f45386b
`SSL_CERT_FILE` has been replaced with `NIX_SSL_CERT_FILE`. Before this change using `fetchdarcs` resulted in an error message like: ``` Identifying repository http://hub.darcs.net/scravy/easyplot inventory darcs failed: Not a repository: http://hub.darcs.net/scravy/easyplot (Peer certificate cannot be authenticated with given CA certificates) HINT: Do you have the right URI for the repository? builder for ‘/nix/store/imyvcs6lvb5yva66krc5wk39931sam8v-fetchdarcs.drv’ failed with exit code 2 ```
20 lines
456 B
Nix
20 lines
456 B
Nix
{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;
|
|
buildInputs = [darcs];
|
|
|
|
outputHashAlgo = "sha256";
|
|
outputHashMode = "recursive";
|
|
outputHash = sha256;
|
|
|
|
inherit url rev context;
|
|
}
|