1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/tools/build-managers/cargo/default.nix
2015-11-03 20:32:12 +01:00

37 lines
950 B
Nix

{ stdenv, fetchgit, rustPlatform, file, curl, python, pkgconfig, openssl
, cmake, zlib }:
with ((import ./common.nix) { inherit stdenv; version = "0.6.0"; });
with rustPlatform;
buildRustPackage rec {
inherit name version meta;
# Needs to use fetchgit instead of fetchFromGitHub to fetch submodules
src = fetchgit {
url = "git://github.com/rust-lang/cargo";
rev = "refs/tags/${version}";
sha256 = "1kxri32sz9ygnf4wlbj7hc7q9p6hmm5xrb9zzkx23wzkzbcpyjyz";
};
depsSha256 = "1m045yywv67sx75idbsny59d3dzbqnhr07k41jial5n5zwp87mb9";
buildInputs = [ file curl pkgconfig python openssl cmake zlib ];
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}
'';
}