Skip to content

Commit 3d2621b

Browse files
samrosedarora
authored andcommitted
fix: fixes build on aarch64-darwin
1 parent fe5a4c5 commit 3d2621b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

nix/ext/pg_jsonschema.nix

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ buildPgrxExtension_0_11_3 rec {
1313
};
1414

1515
nativeBuildInputs = [ cargo ];
16+
buildInputs = [ postgresql ];
1617

1718
CARGO="${cargo}/bin/cargo";
18-
19-
19+
env = lib.optionalAttrs stdenv.isDarwin {
20+
POSTGRES_LIB = "${postgresql}/lib";
21+
RUSTFLAGS = "-C link-arg=-undefined -C link-arg=dynamic_lookup";
22+
};
2023
cargoHash = "sha256-VcS+efMDppofuFW2zNrhhsbC28By3lYekDFquHPta2g=";
2124

2225
# FIXME (aseipp): testsuite tries to write files into /nix/store; we'll have
@@ -30,4 +33,4 @@ buildPgrxExtension_0_11_3 rec {
3033
platforms = postgresql.meta.platforms;
3134
license = licenses.postgresql;
3235
};
33-
}
36+
}

0 commit comments

Comments
 (0)