depot/third_party/nixpkgs/pkgs/development/compilers/rust/make-rust-platform.nix
Default email aa526eb20f Project import generated by Copybara.
GitOrigin-RevId: fcd48a5a0693f016a5c370460d0c2a8243b882dc
2022-03-10 11:12:11 -08:00

35 lines
1 KiB
Nix

{ buildPackages, callPackage, stdenv, runCommand }@prev:
{ rustc, cargo, stdenv ? prev.stdenv, ... }:
rec {
rust = {
inherit rustc cargo;
};
fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetch-cargo-tarball {
git = buildPackages.gitMinimal;
inherit cargo;
};
buildRustPackage = callPackage ../../../build-support/rust/build-rust-package {
git = buildPackages.gitMinimal;
inherit stdenv cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook
fetchCargoTarball importCargoLock rustc;
};
importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix {};
rustcSrc = callPackage ./rust-src.nix {
inherit runCommand rustc;
};
rustLibSrc = callPackage ./rust-lib-src.nix {
inherit runCommand rustc;
};
# Hooks
inherit (callPackage ../../../build-support/rust/hooks {
inherit stdenv cargo rustc;
}) cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook maturinBuildHook bindgenHook;
}