2024-09-06 11:49:30 +00:00
|
|
|
# This file was @generated by cargo2nix 0.11.0.
|
|
|
|
# It is not intended to be manually edited.
|
|
|
|
args @ {
|
|
|
|
release ? true,
|
|
|
|
rootFeatures ? [
|
2024-09-06 18:37:10 +00:00
|
|
|
"extra-math/default"
|
2024-09-06 11:49:30 +00:00
|
|
|
],
|
|
|
|
rustPackages,
|
|
|
|
buildRustPackages,
|
|
|
|
hostPlatform,
|
|
|
|
hostPlatformCpu ? null,
|
|
|
|
hostPlatformFeatures ? [],
|
|
|
|
target ? null,
|
|
|
|
codegenOpts ? null,
|
|
|
|
profileOpts ? null,
|
|
|
|
cargoUnstableFlags ? null,
|
|
|
|
rustcLinkFlags ? null,
|
|
|
|
rustcBuildFlags ? null,
|
|
|
|
mkRustCrate,
|
|
|
|
rustLib,
|
|
|
|
lib,
|
|
|
|
workspaceSrc,
|
|
|
|
ignoreLockHash,
|
|
|
|
}: let
|
2024-09-06 18:37:10 +00:00
|
|
|
nixifiedLockHash = "9a1ee9305c225b74d8dc742d0cdc3b6fa8f016ddd5427a73b6ec00ee90d7f0f7";
|
2024-09-06 11:49:30 +00:00
|
|
|
workspaceSrc =
|
|
|
|
if args.workspaceSrc == null
|
|
|
|
then ./.
|
|
|
|
else args.workspaceSrc;
|
|
|
|
currentLockHash = builtins.hashFile "sha256" (workspaceSrc + /Cargo.lock);
|
|
|
|
lockHashIgnored =
|
|
|
|
if ignoreLockHash
|
|
|
|
then builtins.trace "Ignoring lock hash" ignoreLockHash
|
|
|
|
else ignoreLockHash;
|
|
|
|
in
|
|
|
|
if !lockHashIgnored && (nixifiedLockHash != currentLockHash)
|
|
|
|
then throw "Cargo.nix ${nixifiedLockHash} is out of sync with Cargo.lock ${currentLockHash}"
|
|
|
|
else 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 cargoUnstableFlags 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 = {
|
2024-09-06 18:37:10 +00:00
|
|
|
extra-math = rustPackages.unknown.extra-math."0.1.0";
|
2024-09-06 11:49:30 +00:00
|
|
|
};
|
2024-09-06 18:37:10 +00:00
|
|
|
"registry+https://github.com/rust-lang/crates.io-index".autocfg."1.3.0" = overridableMkRustCrate (profileName: rec {
|
|
|
|
name = "autocfg";
|
|
|
|
version = "1.3.0";
|
|
|
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
|
|
|
src = fetchCratesIo {
|
|
|
|
inherit name version;
|
|
|
|
sha256 = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
"unknown".extra-math."0.1.0" = overridableMkRustCrate (profileName: rec {
|
|
|
|
name = "extra-math";
|
2024-09-06 11:49:30 +00:00
|
|
|
version = "0.1.0";
|
|
|
|
registry = "unknown";
|
|
|
|
src = fetchCrateLocal workspaceSrc;
|
2024-09-06 18:37:10 +00:00
|
|
|
features = builtins.concatLists [
|
|
|
|
(lib.optional (rootFeatures' ? "extra-math/default") "default")
|
|
|
|
(lib.optional (rootFeatures' ? "extra-math/std") "std")
|
|
|
|
];
|
|
|
|
dependencies = {
|
|
|
|
libm = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libm."0.2.8" {inherit profileName;}).out;
|
|
|
|
num_traits = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.19" {inherit profileName;}).out;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
"registry+https://github.com/rust-lang/crates.io-index".libm."0.2.8" = overridableMkRustCrate (profileName: rec {
|
|
|
|
name = "libm";
|
|
|
|
version = "0.2.8";
|
|
|
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
|
|
|
src = fetchCratesIo {
|
|
|
|
inherit name version;
|
|
|
|
sha256 = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058";
|
|
|
|
};
|
|
|
|
features = builtins.concatLists [
|
|
|
|
["default"]
|
|
|
|
];
|
|
|
|
});
|
|
|
|
|
|
|
|
"registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.19" = overridableMkRustCrate (profileName: rec {
|
|
|
|
name = "num-traits";
|
|
|
|
version = "0.2.19";
|
|
|
|
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
|
|
|
src = fetchCratesIo {
|
|
|
|
inherit name version;
|
|
|
|
sha256 = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841";
|
|
|
|
};
|
|
|
|
features = builtins.concatLists [
|
|
|
|
["libm"]
|
|
|
|
(lib.optional (rootFeatures' ? "extra-math/std") "std")
|
|
|
|
];
|
|
|
|
dependencies = {
|
|
|
|
libm = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libm."0.2.8" {inherit profileName;}).out;
|
|
|
|
};
|
|
|
|
buildDependencies = {
|
|
|
|
autocfg = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.3.0" {profileName = "__noProfile";}).out;
|
|
|
|
};
|
2024-09-06 11:49:30 +00:00
|
|
|
});
|
|
|
|
}
|