2021-10-29 08:25:35 +02:00
|
|
|
{ buildPackages, callPackage }:
|
2020-10-01 23:51:46 +02:00
|
|
|
|
2021-10-29 08:25:35 +02:00
|
|
|
{ rustc, cargo, ... }:
|
2020-10-01 23:51:46 +02:00
|
|
|
|
|
|
|
rec {
|
|
|
|
rust = {
|
|
|
|
inherit rustc cargo;
|
|
|
|
};
|
|
|
|
|
|
|
|
fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetchCargoTarball.nix {
|
2021-06-13 04:54:49 +02:00
|
|
|
git = buildPackages.gitMinimal;
|
2021-10-29 08:25:35 +02:00
|
|
|
inherit cargo;
|
2020-10-01 23:51:46 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildRustPackage = callPackage ../../../build-support/rust {
|
2021-06-13 04:54:49 +02:00
|
|
|
git = buildPackages.gitMinimal;
|
2021-10-29 08:25:35 +02:00
|
|
|
inherit cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook
|
2021-05-08 07:44:31 +02:00
|
|
|
fetchCargoTarball importCargoLock rustc;
|
2020-10-01 23:51:46 +02:00
|
|
|
};
|
|
|
|
|
2021-05-08 07:40:34 +02:00
|
|
|
importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix {};
|
|
|
|
|
2020-10-01 23:51:46 +02:00
|
|
|
rustcSrc = callPackage ./rust-src.nix {
|
2021-10-29 08:25:35 +02:00
|
|
|
inherit rustc;
|
2020-10-01 23:51:46 +02:00
|
|
|
};
|
2020-11-06 17:31:25 +01:00
|
|
|
|
|
|
|
rustLibSrc = callPackage ./rust-lib-src.nix {
|
2021-10-29 08:25:35 +02:00
|
|
|
inherit rustc;
|
2020-11-06 17:31:25 +01:00
|
|
|
};
|
2021-02-09 11:38:25 +01:00
|
|
|
|
|
|
|
# Hooks
|
2021-02-11 17:32:47 +01:00
|
|
|
inherit (callPackage ../../../build-support/rust/hooks {
|
2021-10-29 08:25:35 +02:00
|
|
|
inherit cargo rustc;
|
2021-02-15 10:26:40 +01:00
|
|
|
}) cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook maturinBuildHook;
|
2020-10-01 23:51:46 +02:00
|
|
|
}
|