diff options
author | Robert Hensing <robert@roberthensing.nl> | 2022-04-16 17:37:13 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-04-16 17:37:13 +0200 |
commit | b4b53283896327360ecf4bcc5ae8c87212ca3ed0 (patch) | |
tree | d8cb593ce9c4c03affb7c2ff3d392265e9b93198 /pkgs/development/haskell-modules | |
parent | ebf1ce192388b5588e1a206579d9678a93fad65e (diff) | |
download | nixpkgs-b4b53283896327360ecf4bcc5ae8c87212ca3ed0.tar nixpkgs-b4b53283896327360ecf4bcc5ae8c87212ca3ed0.tar.gz nixpkgs-b4b53283896327360ecf4bcc5ae8c87212ca3ed0.tar.bz2 nixpkgs-b4b53283896327360ecf4bcc5ae8c87212ca3ed0.tar.lz nixpkgs-b4b53283896327360ecf4bcc5ae8c87212ca3ed0.tar.xz nixpkgs-b4b53283896327360ecf4bcc5ae8c87212ca3ed0.tar.zst nixpkgs-b4b53283896327360ecf4bcc5ae8c87212ca3ed0.zip |
haskellPackages.esqueleto: Enable tests
Diffstat (limited to 'pkgs/development/haskell-modules')
-rw-r--r-- | pkgs/development/haskell-modules/configuration-common.nix | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 968a83ec50f..0bff301224c 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/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; |