Skip to content

Conversation

@szaffarano
Copy link
Contributor

Fixes #644

# PLEASE keep this sorted alphabetically.
config.hooks = mapAttrs (_: mapAttrs (_: mkDefault))
rec {
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related to this PR, but the linter marked it as unused, so I removed it.

@JaanJah
Copy link

JaanJah commented Dec 7, 2025

This PR seems to break my devShell:

EDIT: I am using NixOS 25.05

error:
       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:37:12:
           36|
           37|   strict = derivationStrict drvAttrs;
             |            ^
           38|

       … while evaluating derivation 'nix-shell'
         whose name attribute is located at /nix/store/cd6v80pj9h7r2prxx9a71y92zq88p1xx-source/pkgs/stdenv/generic/make-derivation.nix:541:13

       … while evaluating attribute 'buildInputs' of derivation 'nix-shell'
         at /nix/store/cd6v80pj9h7r2prxx9a71y92zq88p1xx-source/pkgs/stdenv/generic/make-derivation.nix:593:13:
          592|             depsHostHost = elemAt (elemAt dependencies 1) 0;
          593|             buildInputs = elemAt (elemAt dependencies 1) 1;
             |             ^
          594|             depsTargetTarget = elemAt (elemAt dependencies 2) 0;

       … while evaluating the option `enabledPackages':

       … while evaluating the option `hooks.nixfmt-rfc-style.package':

       … while evaluating the option `tools':

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

       error: evaluation aborted with the following error message: 'lib.customisation.callPackageWith: Function called without required argument "rumdl" at /nix/store/w2xlf26gzgnayh4rqm8gixwqnr5hswvk-source/nix/tools.nix:74, did you mean "mdl", "rml" or "rund"?'

Relevant part of my NixOS flake:

      checks = forAllSystems (system: {
        pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
          src = ./.;
          hooks = {
            nixfmt-rfc-style = {
              enable = true;
              excludes = [
                "hardware-configuration\\.nix$"
                "plasma\\.nix$"
              ];
            };
          };
        };
      });


      # Enter a development shell with `nix develop`.
      # The hooks will be installed automatically.
      # Or run pre-commit manually with `nix develop -c pre-commit run --all-files`
      devShells = forAllSystems (system: {
        default =
          let
            pkgs = nixpkgs.legacyPackages.${system};
            inherit (self.checks.${system}.pre-commit-check) shellHook enabledPackages;
          in
          pkgs.mkShell {
            inherit shellHook;
            buildInputs = enabledPackages;
          };
      });
    };

@szaffarano
Copy link
Contributor Author

It's due to an outdated nixpkgs, check #665

@JaanJah
Copy link

JaanJah commented Dec 7, 2025

Thanks, I will just use older revision of git-hooks.nix until it gets a fixed then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Rumdl Markdown linter and formatter

3 participants