From 6c13b31afdd8876d43f7ababed52166072552797 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Mon, 24 Mar 2025 22:03:27 +0100 Subject: [PATCH] buildPgrxExtension: mark packages as broken on darwin Because of [1], we can't run initdb / postgres inside the darwin sandbox, even though it succeeds most of the time. It will lead to hard to debug build failures eventually. Since pgrx runs initdb as part of the build... there seems to be no other way than marking those packages as broken for now. This could be relaxed once [2] is available, because we could then disable the checkPhase and all "initdb" for pgrx on darwin. [1]: https://github.com/NixOS/nixpkgs/issues/371242#issuecomment-2672697582 [2]: https://github.com/pgcentralfoundation/pgrx/pull/1994 --- .../development/tools/rust/cargo-pgrx/buildPgrxExtension.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix b/pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix index 504ad1a0bbdf..35bc378d1890 100644 --- a/pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix +++ b/pkgs/development/tools/rust/cargo-pgrx/buildPgrxExtension.nix @@ -178,6 +178,11 @@ let (args.checkFeatures or [ ]) ++ (lib.optionals usePgTestCheckFeature [ "pg_test" ]) ++ [ "pg${pgrxPostgresMajor}" ]; + + meta = (args.meta or { }) // { + # See comment in postgresql's generic.nix doInstallCheck section + broken = (args.meta.broken or false) || stdenv.hostPlatform.isDarwin; + }; }; in rustPlatform.buildRustPackage finalArgs