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.

36 lines
1 KiB
Nix
Raw Normal View History

2022-02-23 15:56:10 +01:00
{ buildPackages, callPackage, stdenv, runCommand }@prev:
{ rustc, cargo, stdenv ? prev.stdenv, ... }:
rec {
rust = {
inherit rustc cargo;
};
fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetch-cargo-tarball {
2021-06-13 04:54:49 +02:00
git = buildPackages.gitMinimal;
inherit cargo;
};
buildRustPackage = callPackage ../../../build-support/rust/build-rust-package {
2021-06-13 04:54:49 +02:00
git = buildPackages.gitMinimal;
inherit stdenv cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook
fetchCargoTarball importCargoLock rustc;
};
importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix {};
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 (callPackage ../../../build-support/rust/hooks {
inherit stdenv cargo rustc;
2022-02-13 13:00:00 +01:00
}) cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook maturinBuildHook bindgenHook;
}