srid/haskell-flake

Add `cabal check` to `checks`

Aberta

#50 aberto em 1 de dez. de 2022

 (0 comentário) (0 reação) (0 responsável)Nix (26 forks)github user discovery
enhancementgood first issue

Métricas do repositório

Stars
 (231 estrelas)
Métricas de merge de PR
 (Mesclagem média 9h 49m) (1 fundiu PR em 30d)

Description

In arion I had a separate build with

                  checked = super.haskell.lib.overrideCabal pkg (o: {
                    postConfigure = ''${o.postConfigure or ""}
                      if ! ${hsuper.cabal-install}/bin/cabal check;
                      then
                        echo 1>&2 ERROR: cabal file is invalid. Above warnings were errors.
                        exit 1
                      fi
                    '';
                  });

I think we could touch the outputs and exit 0 to speed this up. Doing it in runCommand would be fragile. This should probably call Setup.hs instead of cabal-install.

Running it as part of the main build isn't ideal because the check may be more strict than necessary. I think it should only run in CI.

Guia do colaborador