mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 09:13:17 +00:00
d083f412fa
This makes it possible to reuse this functionality as a hook in derivations that do not use buildRustPackage.
29 lines
587 B
Nix
29 lines
587 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 cargoSetupHook fetchCargoTarball;
|
|
};
|
|
|
|
rustcSrc = callPackage ./rust-src.nix {
|
|
inherit rustc;
|
|
};
|
|
|
|
rustLibSrc = callPackage ./rust-lib-src.nix {
|
|
inherit rustc;
|
|
};
|
|
|
|
# Hooks
|
|
inherit (callPackage ../../../build-support/rust/hooks { }) cargoSetupHook;
|
|
}
|