2023-04-13 14:12:52 +00:00
|
|
|
{ buildPackages, callPackage, cargo-auditable, stdenv, runCommand }@prev:
|
2020-10-01 21:51:46 +00:00
|
|
|
|
2023-01-12 17:22:07 +00:00
|
|
|
{ rustc
|
|
|
|
, cargo
|
2023-04-13 14:12:52 +00:00
|
|
|
, cargo-auditable ? prev.cargo-auditable
|
2023-01-12 17:22:07 +00:00
|
|
|
, stdenv ? prev.stdenv
|
|
|
|
, ...
|
|
|
|
}:
|
2020-10-01 21:51:46 +00:00
|
|
|
|
|
|
|
rec {
|
|
|
|
rust = {
|
|
|
|
inherit rustc cargo;
|
|
|
|
};
|
|
|
|
|
2021-11-02 01:48:55 +00:00
|
|
|
fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetch-cargo-tarball {
|
2021-06-13 02:54:49 +00:00
|
|
|
git = buildPackages.gitMinimal;
|
2021-10-29 06:25:35 +00:00
|
|
|
inherit cargo;
|
2020-10-01 21:51:46 +00:00
|
|
|
};
|
|
|
|
|
2021-11-02 01:48:55 +00:00
|
|
|
buildRustPackage = callPackage ../../../build-support/rust/build-rust-package {
|
2022-11-28 22:00:17 +00:00
|
|
|
inherit stdenv cargoBuildHook cargoCheckHook cargoInstallHook cargoNextestHook cargoSetupHook
|
2023-01-12 17:22:07 +00:00
|
|
|
fetchCargoTarball importCargoLock rustc cargo cargo-auditable;
|
2020-10-01 21:51:46 +00:00
|
|
|
};
|
|
|
|
|
2022-10-04 10:09:52 +00:00
|
|
|
importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix { inherit cargo; };
|
2021-05-08 05:40:34 +00:00
|
|
|
|
2020-10-01 21:51:46 +00:00
|
|
|
rustcSrc = callPackage ./rust-src.nix {
|
2022-02-23 14:56:10 +00:00
|
|
|
inherit runCommand rustc;
|
2020-10-01 21:51:46 +00:00
|
|
|
};
|
2020-11-06 16:31:25 +00:00
|
|
|
|
|
|
|
rustLibSrc = callPackage ./rust-lib-src.nix {
|
2022-02-23 14:56:10 +00:00
|
|
|
inherit runCommand rustc;
|
2020-11-06 16:31:25 +00:00
|
|
|
};
|
2021-02-09 10:38:25 +00:00
|
|
|
|
|
|
|
# Hooks
|
2021-02-11 16:32:47 +00:00
|
|
|
inherit (callPackage ../../../build-support/rust/hooks {
|
2021-10-27 05:04:25 +00:00
|
|
|
inherit stdenv cargo rustc;
|
2022-11-28 22:00:17 +00:00
|
|
|
}) cargoBuildHook cargoCheckHook cargoInstallHook cargoNextestHook cargoSetupHook maturinBuildHook bindgenHook;
|
2020-10-01 21:51:46 +00:00
|
|
|
}
|