From 7d661a4ab40a6296322bb7eced188a6d74dc6dc1 Mon Sep 17 00:00:00 2001 From: Tadas Barzdzius Date: Wed, 20 Apr 2016 12:42:37 +0300 Subject: [PATCH] cargo: 0.8.0 -> 0.9.0. Enable Darwin --- .../tools/build-managers/cargo/common.nix | 4 ++-- .../tools/build-managers/cargo/default.nix | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/pkgs/development/tools/build-managers/cargo/common.nix b/pkgs/development/tools/build-managers/cargo/common.nix index 110956ebf85d..649664793192 100644 --- a/pkgs/development/tools/build-managers/cargo/common.nix +++ b/pkgs/development/tools/build-managers/cargo/common.nix @@ -31,8 +31,8 @@ meta = with stdenv.lib; { homepage = http://crates.io; description = "Downloads your Rust project's dependencies and builds your project"; - maintainers = with maintainers; [ wizeman ]; + maintainers = with maintainers; [ wizeman retrry ]; license = [ licenses.mit licenses.asl20 ]; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; } diff --git a/pkgs/development/tools/build-managers/cargo/default.nix b/pkgs/development/tools/build-managers/cargo/default.nix index e0094b4350a7..c3e782a12ea7 100644 --- a/pkgs/development/tools/build-managers/cargo/default.nix +++ b/pkgs/development/tools/build-managers/cargo/default.nix @@ -1,11 +1,11 @@ -{ stdenv, fetchgit, rustPlatform, file, curl, python, pkgconfig, openssl +{ stdenv, cacert, fetchgit, rustPlatform, file, curl, python, pkgconfig, openssl , cmake, zlib, makeWrapper }: with rustPlatform; with ((import ./common.nix) { inherit stdenv rustc; - version = "0.8.0"; + version = "0.9.0"; }); buildRustPackage rec { @@ -15,10 +15,10 @@ buildRustPackage rec { src = fetchgit { url = "git://github.com/rust-lang/cargo"; rev = "refs/tags/${version}"; - sha256 = "02z0b6hpygjjfbskg22ggrhdv2nasrgf8x1fd8y0qzg4krx2czlh"; + sha256 = "0d3n2jdhaz06yhilvmw3m2avxv501da1hdhljc9mwkz3l5bkv2jv"; }; - depsSha256 = "1gwc5ygs3h8jxs506xmbj1xzaqpb3kmg3pkxg9j9yqy616jw6rcn"; + depsSha256 = "1x2m7ww2z8nl5ic2nds85p7ma8x0zp654jg7ay905ia95daiabzg"; buildInputs = [ file curl pkgconfig python openssl cmake zlib makeWrapper ]; @@ -28,8 +28,15 @@ buildRustPackage rec { buildPhase = "make"; - # Disable check phase as there are lots of failures (some probably due to - # trying to access the network). + checkPhase = '' + # Export SSL_CERT_FILE as without it one test fails with SSL verification error + export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt + # Disable cross compilation tests + export CFG_DISABLE_CROSS_TESTS=1 + cargo test + ''; + + # Disable check phase as there are failures (author_prefers_cargo test fails) doCheck = false; installPhase = ''