From 82e7ee3aac060438db670f603b9c34bf9f79c31d Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sat, 26 Mar 2022 14:52:43 -0400 Subject: [PATCH] Add a comment explaining why we need the 'check' attribute --- flake.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 04cf0b0..fe0b59d 100644 --- a/flake.nix +++ b/flake.nix @@ -89,14 +89,16 @@ ]; }; - # To run these checks locally: - # nix build .#check.x86_64-linux - # (Replace with your system) checks = { format-haskell = inputs.lint-utils.linters.${system}.${haskellFormatter} ./.; format-cabal = inputs.lint-utils.linters.${system}.cabal-fmt ./.; format-nix = inputs.lint-utils.linters.${system}.nixpkgs-fmt ./.; }; + + # We needs this hack because `nix flake check` won't work for Haskell + # projects: https://nixos.wiki/wiki/Import_From_Derivation#IFD_and_Haskell + # + # Instead, run: `nix build .#check.x86_64-linux` (replace with your system) check = pkgs.runCommand "combined-checks" {