mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-06 18:26:45 +01:00
1da0b1dbc9
rustPlatform.buildRustPackage: support direct use of Cargo.lock
34 lines
842 B
Nix
34 lines
842 B
Nix
{ buildPackages, callPackage }:
|
|
|
|
{ rustc, cargo, ... }:
|
|
|
|
rec {
|
|
rust = {
|
|
inherit rustc cargo;
|
|
};
|
|
|
|
fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetchCargoTarball.nix {
|
|
inherit cargo;
|
|
};
|
|
|
|
buildRustPackage = callPackage ../../../build-support/rust {
|
|
inherit cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook
|
|
fetchCargoTarball importCargoLock rustc;
|
|
};
|
|
|
|
importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix {};
|
|
|
|
rustcSrc = callPackage ./rust-src.nix {
|
|
inherit rustc;
|
|
};
|
|
|
|
rustLibSrc = callPackage ./rust-lib-src.nix {
|
|
inherit rustc;
|
|
};
|
|
|
|
# Hooks
|
|
inherit (callPackage ../../../build-support/rust/hooks {
|
|
inherit cargo rustc;
|
|
}) cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook maturinBuildHook;
|
|
}
|