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-03-20";
|
|
});
|
|
|
|
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 = "132b82d75f607dcb1116b8d44fe60f202f1eb110";
|
|
sha256 = "0kx2m0p45zr0ils2ax19sr32cibjppgwj8xvsgrfvzvlnc540xpl";
|
|
};
|
|
|
|
depsSha256 = "19d2fl5p92108a0yjpix0qxdc23jy122xc87k69hk0pwwxa92l3a";
|
|
|
|
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}
|
|
'';
|
|
}
|