diff --git a/flake.lock b/flake.lock index c3acea3..523ee1e 100644 --- a/flake.lock +++ b/flake.lock @@ -54,11 +54,11 @@ ] }, "locked": { - "lastModified": 1648231648, - "narHash": "sha256-1X5rhcb53AFiMPiln5l/694L+J1PRudFKkemQtJSOL4=", + "lastModified": 1648232278, + "narHash": "sha256-GDyLjj64sA65MPMlOtzs5DHPK4O5O8u6jMYKiGHgaPU=", "ref": "lc/fourmolu", - "rev": "d4418e62a1b4ca84915ca35af22beb303569e649", - "revCount": 15, + "rev": "822770e9ca42d594a25f5b161f93f21c5d023bbd", + "revCount": 19, "type": "git", "url": "https://gitlab.homotopic.tech/nix/lint-utils.git" }, diff --git a/flake.nix b/flake.nix index 1dc2c5f..412507a 100644 --- a/flake.nix +++ b/flake.nix @@ -55,13 +55,29 @@ { # Used by `nix build` & `nix run` (prod exe) defaultPackage = project false; + # Used by `nix develop` (dev shell) + devShell = project true; + # Used by `nix run ...` apps = { format = inputs.lint-utils.apps.${system}.fourmoluStandard8107; }; - # Used by `nix develop` (dev shell) - devShell = project true; + # Used by `nix flake check` + checks = { + format-haskell = inputs.lint-utils.linters.${system}.fourmoluStandardGHC8107; + format-cabal = inputs.lint-utils.linters.${system}.cabal; + format-nix = inputs.lint-utils.linters.${system}.nixpkgs-fmt; + }; + check = + pkgs.runCommand "combined-checks" + { + checksss = builtins.attrValues self.checks.${system}; + } '' + echo $checksss + touch $out + '' ; + }) // { # For hercules-CI support, # https://docs.hercules-ci.com/hercules-ci/guides/upgrade-to-agent-0.9/#_upgrade_your_repositories