cachix/git-hooks.nix

The treefmt flake-parts integration has conflicting config definitions

sandydoo opened this issue · 0 comments

          I think this PR is causing the following issue (specifically with the flake.parts module?):
trace: warning: The option `settings.treefmt.package' defined in `/nix/store/wgw700x1vzpjxak25kkd3s2fk3k6x5m7-source/flake-module.nix' has been renamed to `hooks.treefmt.package'.
error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'dotfiles'
         whose name attribute is located at /nix/store/89f8hv2f5yw79zjnbrvibsdmqsnndl97-source/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute '__impureHostDeps' of derivation 'dotfiles'

         at /nix/store/89f8hv2f5yw79zjnbrvibsdmqsnndl97-source/pkgs/stdenv/generic/make-derivation.nix:443:7:

          442|       __propagatedSandboxProfile = unique (computedPropagatedSandboxProfile ++ [ propagatedSandboxProfile ]);
          443|       __impureHostDeps = computedImpureHostDeps ++ computedPropagatedImpureHostDeps ++ __propagatedImpureHostDeps ++ __impureHostDeps ++ stdenv.__extraImpureHostDeps ++ [
             |       ^
          444|         "/dev/zero"

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: The option `perSystem.aarch64-darwin.pre-commit.settings.hooks.treefmt.package' is defined multiple times while it's expected to be unique.

       Definition values:
       - In `/nix/store/wgw700x1vzpjxak25kkd3s2fk3k6x5m7-source/modules/hooks.nix': <derivation treefmt>
       - In `/nix/store/wgw700x1vzpjxak25kkd3s2fk3k6x5m7-source/modules/hooks.nix': <derivation treefmt>
       Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.

Originally posted by @nifoc in #397 (comment)