depot/third_party/nixpkgs/pkgs/development/compilers/rust/make-rust-platform.nix

32 lines
719 B
Nix
Raw Normal View History

{ 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 cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook
fetchCargoTarball rustc;
};
rustcSrc = callPackage ./rust-src.nix {
inherit rustc;
};
rustLibSrc = callPackage ./rust-lib-src.nix {
inherit rustc;
};
# Hooks
inherit (callPackage ../../../build-support/rust/hooks {
inherit cargo;
}) cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook maturinBuildHook;
}