2014-10-10 14:59:37 +00:00
|
|
|
{ stdenv, cacert, git, rustc, cargo, rustRegistry }:
|
2015-05-29 17:35:31 +00:00
|
|
|
{ name ? "cargo-deps", src, srcs, sourceRoot, sha256, cargoUpdateHook ? "" }:
|
2014-10-10 14:59:37 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "${name}-fetch";
|
|
|
|
buildInputs = [ rustc cargo git ];
|
2015-05-29 17:35:31 +00:00
|
|
|
inherit src srcs sourceRoot rustRegistry cargoUpdateHook;
|
|
|
|
|
|
|
|
phases = "unpackPhase installPhase";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
${./fetch-cargo-deps} . "$out"
|
|
|
|
'';
|
2014-10-10 14:59:37 +00:00
|
|
|
|
|
|
|
outputHashAlgo = "sha256";
|
|
|
|
outputHashMode = "recursive";
|
|
|
|
outputHash = sha256;
|
|
|
|
|
2015-06-05 20:00:52 +00:00
|
|
|
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
2014-10-10 14:59:37 +00:00
|
|
|
|
|
|
|
impureEnvVars = [ "http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy" ];
|
|
|
|
preferLocalBuild = true;
|
|
|
|
}
|