diff options
Diffstat (limited to 'pkgs/development/compilers/rust/cargo.nix')
-rw-r--r-- | pkgs/development/compilers/rust/cargo.nix | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/pkgs/development/compilers/rust/cargo.nix b/pkgs/development/compilers/rust/cargo.nix index 4c397c8c1a48..fecf80a44853 100644 --- a/pkgs/development/compilers/rust/cargo.nix +++ b/pkgs/development/compilers/rust/cargo.nix @@ -1,7 +1,8 @@ { stdenv, fetchFromGitHub, file, curl, pkgconfig, python, openssl, cmake, zlib , makeWrapper, libiconv, cacert, rustPlatform, rustc, libgit2, darwin -, version, srcSha, cargoSha256 -, patches ? [] }: +, version +, patches ? [] +, src }: let inherit (darwin.apple_sdk.frameworks) CoreFoundation; @@ -9,17 +10,12 @@ in rustPlatform.buildRustPackage rec { name = "cargo-${version}"; - inherit version; + inherit version src patches; - src = fetchFromGitHub { - owner = "rust-lang"; - repo = "cargo"; - rev = version; - sha256 = srcSha; - }; - - inherit cargoSha256; - inherit patches; + # the rust source tarball already has all the dependencies vendored, no need to fetch them again + cargoVendorDir = "src/vendor"; + preBuild = "cd src; pushd tools/cargo"; + postBuild = "popd"; passthru.rustc = rustc; |