0d9fc34957
GitOrigin-RevId: 5ed481943351e9fd354aeb557679624224de38d5
39 lines
1.1 KiB
Nix
39 lines
1.1 KiB
Nix
{ buildPackages, callPackage, stdenv, runCommand }@prev:
|
|
|
|
{ rustc
|
|
, cargo
|
|
, cargo-auditable ? null
|
|
, 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 {
|
|
inherit stdenv cargoBuildHook cargoCheckHook cargoInstallHook cargoNextestHook cargoSetupHook
|
|
fetchCargoTarball importCargoLock rustc cargo cargo-auditable;
|
|
};
|
|
|
|
importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix { inherit cargo; };
|
|
|
|
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 cargoNextestHook cargoSetupHook maturinBuildHook bindgenHook;
|
|
}
|