40 lines
1019 B
Nix
40 lines
1019 B
Nix
{ stdenv, fetchgit, rustPlatform, file, curl, python, pkgconfig, openssl
|
|
, cmake, zlib, makeWrapper }:
|
|
|
|
with rustPlatform;
|
|
|
|
with ((import ./common.nix) {
|
|
inherit stdenv rustc;
|
|
version = "2016-02-25";
|
|
});
|
|
|
|
buildRustPackage rec {
|
|
inherit name version meta passthru;
|
|
|
|
# Needs to use fetchgit instead of fetchFromGitHub to fetch submodules
|
|
src = fetchgit {
|
|
url = "git://github.com/rust-lang/cargo";
|
|
rev = "e7212896dc1b182493a0252a2a126db8be067153";
|
|
sha256 = "1qbic7gp7cpihi40kfv3kagja8zsngica8sq9jcm9czb6ba44dsa";
|
|
};
|
|
|
|
depsSha256 = "1xfpj1233p4314j6jmip0jjl5m3kj2wbac1ll3yvh7383zb83i1s";
|
|
|
|
buildInputs = [ file curl pkgconfig python openssl cmake zlib makeWrapper ];
|
|
|
|
configurePhase = ''
|
|
./configure --enable-optimize --prefix=$out --local-cargo=${cargo}/bin/cargo
|
|
'';
|
|
|
|
buildPhase = "make";
|
|
|
|
# Disable check phase as there are lots of failures (some probably due to
|
|
# trying to access the network).
|
|
doCheck = false;
|
|
|
|
installPhase = ''
|
|
make install
|
|
${postInstall}
|
|
'';
|
|
}
|