2014-10-10 16:59:37 +02:00
|
|
|
{ stdenv, fetchgit, rustPlatform, file, curl, python, pkgconfig, openssl
|
|
|
|
, cmake, zlib }:
|
|
|
|
|
|
|
|
with ((import ./common.nix) { inherit stdenv; version = "2015-04-14"; });
|
|
|
|
|
|
|
|
with rustPlatform;
|
|
|
|
|
|
|
|
buildRustPackage rec {
|
2015-04-23 15:14:34 +02:00
|
|
|
inherit name version meta;
|
2014-10-10 16:59:37 +02:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/rust-lang/cargo.git";
|
|
|
|
rev = "d49b44358ed800351647571144257d35ac0886cf";
|
|
|
|
sha256 = "1kaims28237mvp1qpw2cfgb3684jr54ivkdag0lw8iv9xap4i35y";
|
|
|
|
leaveDotGit = true;
|
|
|
|
};
|
|
|
|
|
2015-04-23 02:43:11 +02:00
|
|
|
cargoUpdateHook = ''
|
|
|
|
# Updating because version 2.1.4 has an invalid Cargo.toml
|
|
|
|
cargo update -p libressl-pnacl-sys --precise 2.1.5
|
|
|
|
|
|
|
|
# Updating because version 0.1.3 has a build failure with recent rustc
|
|
|
|
cargo update -p threadpool --precise 0.1.4
|
|
|
|
'';
|
|
|
|
|
2015-04-23 20:15:47 +02:00
|
|
|
depsSha256 = "1gj3mnjj17h5p0r1jcm3m3pm3p3l1rbfdz3l7v1cykng78dsabnq";
|
2014-10-10 16:59:37 +02:00
|
|
|
|
|
|
|
buildInputs = [ file curl pkgconfig python openssl cmake zlib ];
|
|
|
|
|
|
|
|
configurePhase = ''
|
2015-04-21 20:17:05 +02:00
|
|
|
./configure --enable-optimize --prefix=$out --local-cargo=${cargo}/bin/cargo
|
2014-10-10 16:59:37 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = "make";
|
|
|
|
|
2015-04-21 20:34:26 +02:00
|
|
|
# Disable check phase as there are lots of failures (some probably due to
|
|
|
|
# trying to access the network).
|
|
|
|
doCheck = false;
|
|
|
|
|
2014-10-10 16:59:37 +02:00
|
|
|
installPhase = ''
|
|
|
|
make install
|
|
|
|
${postInstall}
|
|
|
|
'';
|
|
|
|
}
|