Skip to content

Commit 9869d7f

Browse files
postgresql: enable tests on darwin
The tests were disabled in #62752. The problem is System Integrity Protection on macOS, which resets DYDL_LIBRARY_PATH and thus breaks the temporary installation of PostgreSQL. By running the checks *after* the installPhase, the libraries will already be available in the default locations.
1 parent 4685474 commit 9869d7f

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

pkgs/servers/sql/postgresql/generic.nix

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,13 @@ let
218218
wrapProgram $out/bin/initdb --prefix PATH ":" ${glibc.bin}/bin
219219
'';
220220

221-
doCheck = !stdenv'.hostPlatform.isDarwin;
222-
# autodetection doesn't seem to able to find this, but it's there.
223-
checkTarget = "check-world";
221+
# Running tests as "install check" to work around SIP issue on macOS:
222+
# https://www.postgresql.org/message-id/flat/4D8E1BC5-BBCF-4B19-8226-359201EA8305%40gmail.com
223+
# Also see <nixpkgs>/doc/stdenv/platform-notes.chapter.md
224+
doCheck = false;
225+
# Tests just get stuck on macOS 14.x for v13 and v14
226+
doInstallCheck = !(stdenv'.hostPlatform.isDarwin && olderThan "15");
227+
installCheckTarget = "check-world";
224228

225229
passthru = let
226230
this = self.callPackage generic args;

0 commit comments

Comments
 (0)