haskellPackages.esqueleto: Enable tests

main
Robert Hensing 2 years ago
parent ebf1ce1923
commit b4b5328389
  1. 25
      pkgs/development/haskell-modules/configuration-common.nix

@ -1190,8 +1190,29 @@ self: super: {
# Fix build with attr-2.4.48 (see #53716)
xattr = appendPatch ./patches/xattr-fix-build.patch super.xattr;
# Some tests depend on a postgresql instance
esqueleto = dontCheck super.esqueleto;
esqueleto =
overrideCabal
(drv: {
postPatch = drv.postPatch or "" + ''
# patch out TCP usage: https://nixos.org/manual/nixpkgs/stable/#sec-postgresqlTestHook-tcp
sed -i test/PostgreSQL/Test.hs \
-e s^host=localhost^^
'';
# Match the test suite defaults (or hardcoded values?)
preCheck = drv.preCheck or "" + ''
PGUSER=esqutest
PGDATABASE=esqutest
'';
testFlags = drv.testFlags or [] ++ [
# We don't have a MySQL test hook yet
"--skip=/Esqueleto/MySQL"
];
testToolDepends = drv.testToolDepends or [] ++ [
pkgs.postgresql
pkgs.postgresqlTestHook
];
})
super.esqueleto;
# Requires API keys to run tests
algolia = dontCheck super.algolia;

Loading…
Cancel
Save