Skip to content

Commit 6353d58

Browse files
committed
chore: improve reproducibility of postgresql builds
Do not create postgresql package that depends on the runtime evaluation context as that harms reproducibility.
1 parent 840005b commit 6353d58

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

nix/postgresql/generic.nix

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,7 @@ let
187187
./patches/paths-for-split-outputs.patch
188188
./patches/specify_pkglibdir_at_runtime.patch
189189
./patches/paths-with-postgresql-suffix.patch
190-
191-
(substituteAll {
192-
src = ./patches/locale-binary-path.patch;
193-
locale = "${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale";
194-
})
190+
./patches/locale-binary-path.patch
195191
]
196192
++ lib.optionals stdenv'.hostPlatform.isMusl (
197193
# Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141
@@ -207,6 +203,7 @@ let
207203
''
208204
# Hardcode the path to pgxs so pg_config returns the path in $out
209205
substituteInPlace "src/common/config_info.c" --subst-var out
206+
substituteInPlace "src/backend/commands/collationcmds.c" --replace-fail '@locale@' '${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale'
210207
''
211208
+ lib.optionalString jitSupport ''
212209
# Force lookup of jit stuff in $out instead of $lib

0 commit comments

Comments
 (0)