haskellPackages.persistent-postgresql: Enable tests

This commit is contained in:
Robert Hensing 2022-04-16 17:39:19 +02:00
parent b4b5328389
commit f60768b6cd

View File

@ -1331,7 +1331,25 @@ self: super: {
# Test suite requires database
persistent-mysql = dontCheck super.persistent-mysql;
persistent-postgresql = dontCheck super.persistent-postgresql;
persistent-postgresql =
overrideCabal
(drv: {
postPatch = drv.postPath or "" + ''
# patch out TCP usage: https://nixos.org/manual/nixpkgs/stable/#sec-postgresqlTestHook-tcp
# NOTE: upstream host variable takes only two values...
sed -i test/PgInit.hs \
-e s^'host=" <> host <> "'^^
'';
preCheck = drv.preCheck or "" + ''
PGDATABASE=test
PGUSER=test
'';
testToolDepends = drv.testToolDepends or [] ++ [
pkgs.postgresql
pkgs.postgresqlTestHook
];
})
super.persistent-postgresql;
# Fix EdisonAPI and EdisonCore for GHC 8.8:
# https://github.com/robdockins/edison/pull/16