diff --git a/pkgs/build-support/rust/fetchcargo.nix b/pkgs/build-support/rust/fetchcargo.nix index 01e410c8bf8e..7a0ba38dce71 100644 --- a/pkgs/build-support/rust/fetchcargo.nix +++ b/pkgs/build-support/rust/fetchcargo.nix @@ -18,9 +18,9 @@ let cargo-vendor-normalise = stdenv.mkDerivation { }; in { name ? "cargo-deps" -, src -, srcs -, patches +, src ? null +, srcs ? [] +, patches ? [] , sourceRoot , sha256 , cargoUpdateHook ? "" diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix index 75104ac7ad58..60e31c6def47 100644 --- a/pkgs/development/compilers/rust/default.nix +++ b/pkgs/development/compilers/rust/default.nix @@ -19,17 +19,17 @@ }.${cpu.name} or cpu.name; in "${cpu_}-${vendor.name}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}"; - makeRustPlatform = { rustc, cargo, ... }: { + makeRustPlatform = { rustc, cargo, ... }: rec { rust = { inherit rustc cargo; }; - buildRustPackage = callPackage ../../../build-support/rust { - inherit rustc cargo; + fetchcargo = buildPackages.callPackage ../../../build-support/rust/fetchcargo.nix { + inherit cargo; + }; - fetchcargo = buildPackages.callPackage ../../../build-support/rust/fetchcargo.nix { - inherit cargo; - }; + buildRustPackage = callPackage ../../../build-support/rust { + inherit rustc cargo fetchcargo; }; rustcSrc = callPackage ./rust-src.nix {