packages
pkgs.rustPackages.packages
Docs pulled from | This Revision | 3 days ago
Contribute
Enhance the ecosystem with your expertise! Contribute to fill the gaps in documentation. Your input can make a difference.
Noogle detected
Implementation
The following is the current implementation of this function.
self:
let
# Like `buildRustPackages`, but may also contain prebuilt binaries to
# break cycle. Just like `bootstrapTools` for nixpkgs as a whole,
# nothing in the final package set should refer to this.
bootstrapRustPackages =
if fastCross then
pkgsBuildBuild.rustPackages
else
self.buildRustPackages.overrideScope (
_: _:
lib.optionalAttrs (stdenv.buildPlatform == stdenv.hostPlatform)
(selectRustPackage pkgsBuildHost).packages.prebuilt
);
bootRustPlatform = makeRustPlatform bootstrapRustPackages;
in
{
# Packages suitable for build-time, e.g. `build.rs`-type stuff.
buildRustPackages = (selectRustPackage pkgsBuildHost).packages.stable;
# Analogous to stdenv
rustPlatform = makeRustPlatform self.buildRustPackages;
rustc-unwrapped = self.callPackage ./rustc.nix {
version = rustcVersion;
sha256 = rustcSha256;
inherit enableRustcDev;
inherit
llvmShared
llvmSharedForBuild
llvmSharedForHost
llvmSharedForTarget
llvmPackages
fastCross
;
patches = rustcPatches;
# Use boot package set to break cycle
inherit (bootstrapRustPackages) cargo rustc rustfmt;
};
rustc = wrapRustcWith {
inherit (self) rustc-unwrapped;
sysroot = if fastCross then self.rustc-unwrapped else null;
};
rustfmt = self.callPackage ./rustfmt.nix {
inherit (self.buildRustPackages) rustc;
};
cargo =
if (!fastCross) then
self.callPackage ./cargo.nix {
# Use boot package set to break cycle
rustPlatform = bootRustPlatform;
}
else
self.callPackage ./cargo_cross.nix { };
inherit cargo-auditable;
cargo-auditable-cargo-wrapper = self.callPackage ./cargo-auditable-cargo-wrapper.nix { };
clippy-unwrapped = self.callPackage ./clippy.nix { };
clippy = if !fastCross then self.clippy-unwrapped else self.callPackage ./clippy-wrapper.nix { };
}