srid/haskell-flake

Add `cabal check` to `checks`

オープン

#50 opened on 2022/12/01

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Nix (26 件のフォーク)github user discovery
enhancementgood first issue

Repository metrics

Stars
 (231 個のスター)
PR merge metrics
 (平均マージ 9h 49m) (30d で 1 merged PR)

説明

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.

コントリビューターガイド