summary refs log tree commit diff
path: root/pkgs/development/compilers/rust/make-rust-platform.nix
blob: 728f459d887afb9a77c18de9ba5f867f58cab101 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ 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;
}