0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 22:20:30 +03:00
nixpkgs/pkgs/development/compilers/rust/make-rust-platform.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

79 lines
1.6 KiB
Nix
Raw Normal View History

{
lib,
buildPackages,
callPackage,
callPackages,
cargo-auditable,
config,
stdenv,
runCommand,
}@prev:
{
rustc,
cargo,
cargo-auditable ? prev.cargo-auditable,
stdenv ? prev.stdenv,
...
}:
rec {
fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetch-cargo-tarball {
2021-06-13 04:54:49 +02:00
git = buildPackages.gitMinimal;
inherit cargo;
};
2024-10-17 22:10:47 +02:00
fetchCargoVendor = buildPackages.callPackage ../../../build-support/rust/fetch-cargo-vendor.nix {
inherit cargo;
};
buildRustPackage = callPackage ../../../build-support/rust/build-rust-package {
inherit
stdenv
cargoBuildHook
cargoCheckHook
cargoInstallHook
cargoNextestHook
cargoSetupHook
fetchCargoTarball
fetchCargoVendor
importCargoLock
rustc
cargo
cargo-auditable
;
};
importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix {
inherit cargo;
};
rustcSrc = callPackage ./rust-src.nix {
2022-02-23 15:56:10 +01:00
inherit runCommand rustc;
};
rustLibSrc = callPackage ./rust-lib-src.nix {
2022-02-23 15:56:10 +01:00
inherit runCommand rustc;
};
# Hooks
inherit
(callPackages ../../../build-support/rust/hooks {
inherit stdenv cargo rustc;
})
cargoBuildHook
cargoCheckHook
cargoInstallHook
cargoNextestHook
cargoSetupHook
maturinBuildHook
bindgenHook
;
}
// lib.optionalAttrs config.allowAliases {
rust = {
rustc = lib.warn "rustPlatform.rust.rustc is deprecated. Use rustc instead." rustc;
cargo = lib.warn "rustPlatform.rust.cargo is deprecated. Use cargo instead." cargo;
};
}