a8efb2053f
- API change: remove the `target` argument of `buildRustPackage`, the target should always be in sync with the C/C++ compiler that is used. - Gathering of binaries has moved from `buildPhase` to `installPhase`, this simplifies the hook and orders this functionality logically with the installation logic.
31 lines
638 B
Nix
31 lines
638 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 rustc cargo cargoBuildHook cargoSetupHook fetchCargoTarball;
|
|
};
|
|
|
|
rustcSrc = callPackage ./rust-src.nix {
|
|
inherit rustc;
|
|
};
|
|
|
|
rustLibSrc = callPackage ./rust-lib-src.nix {
|
|
inherit rustc;
|
|
};
|
|
|
|
# Hooks
|
|
inherit (callPackage ../../../build-support/rust/hooks {
|
|
inherit cargo;
|
|
}) cargoBuildHook cargoSetupHook;
|
|
}
|