mirror of
https://codeberg.org/icewind/mill-scale.git
synced 2026-06-03 09:54:19 +02:00
switch to alejandra for nix formatting
This commit is contained in:
parent
ad3de3f170
commit
576d0418c8
8 changed files with 500 additions and 386 deletions
|
|
@ -1,17 +1,16 @@
|
|||
{ lib }:
|
||||
let
|
||||
{lib}: let
|
||||
inherit (builtins) isAttrs attrNames;
|
||||
inherit (lib) assertMsg remove;
|
||||
in
|
||||
cargoToml: rec {
|
||||
tomlPackage = cargoToml.package or cargoToml.workspace.package;
|
||||
hasMsrv = tomlPackage ? rust-version;
|
||||
hasWorkspace = tomlPackage ? workspace;
|
||||
hasFeatures = cargoToml ? features && isAttrs cargoToml.features;
|
||||
features = cargoToml.features or { };
|
||||
defaultFeatures = features.default or [ ];
|
||||
nonDefaultFeatures = remove "default" (attrNames features);
|
||||
hasNonDefaultFeatures = hasFeatures && (defaultFeatures != nonDefaultFeatures);
|
||||
hasDefaultFeatures = cargoToml ? features && cargoToml.features ? default;
|
||||
msrv = assert assertMsg hasMsrv ''"rust-version" not set in Cargo.toml''; tomlPackage.rust-version;
|
||||
}
|
||||
cargoToml: rec {
|
||||
tomlPackage = cargoToml.package or cargoToml.workspace.package;
|
||||
hasMsrv = tomlPackage ? rust-version;
|
||||
hasWorkspace = tomlPackage ? workspace;
|
||||
hasFeatures = cargoToml ? features && isAttrs cargoToml.features;
|
||||
features = cargoToml.features or {};
|
||||
defaultFeatures = features.default or [];
|
||||
nonDefaultFeatures = remove "default" (attrNames features);
|
||||
hasNonDefaultFeatures = hasFeatures && (defaultFeatures != nonDefaultFeatures);
|
||||
hasDefaultFeatures = cargoToml ? features && cargoToml.features ? default;
|
||||
msrv = assert assertMsg hasMsrv ''"rust-version" not set in Cargo.toml''; tomlPackage.rust-version;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue