Merge pull request #33 from nixops4/no-clippy-for-dependents

Exclude clippy checks from flake module for dependents
This commit is contained in:
Robert Hensing 2025-12-28 18:21:53 +01:00 committed by GitHub
commit 3b9ee17d54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -108,7 +108,13 @@
};
/**
Adds flake checks that test the bindings with the provided nix package.
A flake-parts module for dependents to import. Also dogfooded locally
(extra, not required for normal CI).
Adds flake checks that test the nix-bindings crates with the
dependent's nix package.
See https://github.com/nixops4/nix-bindings-rust?tab=readme-ov-file#integration-with-nix-projects
*/
flake-parts-modules.tested =
# Consumer toplevel
@ -146,9 +152,12 @@
in
{
key = "nix-bindings-rust-add-checks";
# Exclude clippy checks; those are part of this repo's local CI.
# This module is for dependents (and local dogfooding), which
# don't need to run clippy on nix-bindings-rust.
config.checks = lib.concatMapAttrs (
k: v:
lib.optionalAttrs (lib.strings.hasPrefix "nix-bindings-" k) {
lib.optionalAttrs (lib.strings.hasPrefix "nix-bindings-" k && !lib.strings.hasSuffix "-clippy" k) {
"dependency-${k}" = v;
}
) nix-bindings-rust-perSystemConfig.config.checks;