nixpkgs/pkgs/development/compilers/rust/make-rust-platform.nix
Daniël de Kok d083f412fa buildRustPackage: factor out setting up .cargo/config to cargoSetupHook
This makes it possible to reuse this functionality as a hook in
derivations that do not use buildRustPackage.
2021-02-10 07:01:24 +01:00

29 lines
587 B
Nix

{ buildPackages, callPackage }:
{ rustc, cargo, ... }:
rec {
rust = {
inherit rustc cargo;
};
fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetchCargoTarball.nix {
inherit cargo;
};
buildRustPackage = callPackage ../../../build-support/rust {
inherit rustc cargo cargoSetupHook fetchCargoTarball;
};
rustcSrc = callPackage ./rust-src.nix {
inherit rustc;
};
rustLibSrc = callPackage ./rust-lib-src.nix {
inherit rustc;
};
# Hooks
inherit (callPackage ../../../build-support/rust/hooks { }) cargoSetupHook;
}