mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-13 12:23:38 +01:00
nix/nixgen has the package and the clippy and nextest checks (in the default check sets), from a "nixgen" platform of nix/workspace-src.nix that is the tool alone; it is a stub in every other platform's source, so an edit of it rebuilds none of theirs.
43 lines
1.2 KiB
Nix
43 lines
1.2 KiB
Nix
# schemars-nixgen: the package of the tool that writes the Nix options (`just nixgen-linux`,
|
|
# `just nixgen-macos`), and its checks. It is a development tool: nothing of a release has it.
|
|
{
|
|
inputs,
|
|
self,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
lib' = import ../lib.nix { inherit inputs; };
|
|
nixgen = import ./build.nix { inherit inputs self; };
|
|
in
|
|
{
|
|
perSystem =
|
|
{ pkgs, system, ... }:
|
|
let
|
|
build = nixgen.mkNixgenPackages { inherit pkgs; };
|
|
in
|
|
lib.optionalAttrs (builtins.elem system (lib'.macosSystems ++ lib'.linuxSystems)) {
|
|
allChecks = {
|
|
# the format, the TOML and the licenses of the tool are checked with those of the rest of
|
|
# the workspace (`windows-fmt`, `windows-toml-fmt`, `cargo deny` over the workspace)
|
|
nixgen-clippy = build.craneLib.cargoClippy (
|
|
build.individualCrateArgs
|
|
// {
|
|
cargoClippyExtraArgs = "--all-targets -- -D warnings";
|
|
}
|
|
);
|
|
|
|
nixgen-nextest = build.craneLib.cargoNextest (build.individualCrateArgs // { doCheck = true; });
|
|
};
|
|
|
|
packages = {
|
|
inherit (build) schemars-nixgen;
|
|
};
|
|
|
|
apps.schemars-nixgen = {
|
|
type = "app";
|
|
program = "${build.schemars-nixgen}/bin/schemars-nixgen";
|
|
};
|
|
};
|
|
}
|