rkbfirm/Cargo.nix

50 lines
1.5 KiB
Nix
Raw Normal View History

2022-06-30 07:35:20 +00:00
# This file was @generated by cargo2nix 0.11.0.
# It is not intended to be manually edited.
args@{
release ? true,
rootFeatures ? [
"rust-template/default"
],
rustPackages,
buildRustPackages,
hostPlatform,
hostPlatformCpu ? null,
hostPlatformFeatures ? [],
target ? null,
codegenOpts ? null,
profileOpts ? null,
rustcLinkFlags ? null,
rustcBuildFlags ? null,
mkRustCrate,
rustLib,
lib,
workspaceSrc,
}:
let
workspaceSrc = if args.workspaceSrc == null then ./. else args.workspaceSrc;
in let
inherit (rustLib) fetchCratesIo fetchCrateLocal fetchCrateGit fetchCrateAlternativeRegistry expandFeatures decideProfile genDrvsByProfile;
profilesByName = {
};
rootFeatures' = expandFeatures rootFeatures;
overridableMkRustCrate = f:
let
drvs = genDrvsByProfile profilesByName ({ profile, profileName }: mkRustCrate ({ inherit release profile hostPlatformCpu hostPlatformFeatures target profileOpts codegenOpts rustcLinkFlags rustcBuildFlags; } // (f profileName)));
in { compileMode ? null, profileName ? decideProfile compileMode release }:
let drv = drvs.${profileName}; in if compileMode == null then drv else drv.override { inherit compileMode; };
in
{
cargo2nixVersion = "0.11.0";
workspace = {
rust-template = rustPackages.unknown.rust-template."0.1.0";
};
"unknown".rust-template."0.1.0" = overridableMkRustCrate (profileName: rec {
name = "rust-template";
version = "0.1.0";
registry = "unknown";
src = fetchCrateLocal workspaceSrc;
});
}