2020-10-16 20:44:37 +00:00
|
|
|
{ buildPackages, callPackage }:
|
|
|
|
|
|
|
|
{ rustc, cargo, ... }:
|
|
|
|
|
|
|
|
rec {
|
|
|
|
rust = {
|
|
|
|
inherit rustc cargo;
|
|
|
|
};
|
|
|
|
|
|
|
|
fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetchCargoTarball.nix {
|
2021-06-28 23:13:55 +00:00
|
|
|
git = buildPackages.gitMinimal;
|
2020-10-16 20:44:37 +00:00
|
|
|
inherit cargo;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildRustPackage = callPackage ../../../build-support/rust {
|
2021-06-28 23:13:55 +00:00
|
|
|
git = buildPackages.gitMinimal;
|
2021-03-09 03:18:52 +00:00
|
|
|
inherit cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook
|
2021-05-29 03:34:57 +00:00
|
|
|
fetchCargoTarball importCargoLock rustc;
|
2020-10-16 20:44:37 +00:00
|
|
|
};
|
|
|
|
|
2021-05-29 03:34:57 +00:00
|
|
|
importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix {};
|
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
rustcSrc = callPackage ./rust-src.nix {
|
|
|
|
inherit rustc;
|
|
|
|
};
|
2020-11-09 15:59:12 +00:00
|
|
|
|
|
|
|
rustLibSrc = callPackage ./rust-lib-src.nix {
|
|
|
|
inherit rustc;
|
|
|
|
};
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
# Hooks
|
|
|
|
inherit (callPackage ../../../build-support/rust/hooks {
|
2021-05-28 09:39:13 +00:00
|
|
|
inherit cargo rustc;
|
2021-03-09 03:18:52 +00:00
|
|
|
}) cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook maturinBuildHook;
|
2020-10-16 20:44:37 +00:00
|
|
|
}
|