Skip to content

Commit cff2bc0

Browse files
authored
Add std++ to postgres as well as setting LC_CTYPE (#1959)
The reason that necessitates setting LC_CTYPE is not fully clear to me, I've left some comments on the nixos/nixpkgs issue tracker. It appears as if we are pulling LC_CTYPE to be some UTC8 value if it's not set, instead of inheriting it from LC_ALL as it supposed to. NixOS/nixpkgs#150930 (comment)
1 parent c1d6106 commit cff2bc0

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

overlays/musl.nix

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,14 @@ final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isMusl ({
2323
numactl = prev.numactl.overrideAttrs (_: { configureFlags = ["--enable-static"];});
2424

2525
# See https://github.com/input-output-hk/haskell.nix/issues/948
26-
postgresql = (prev.postgresql.overrideAttrs (old: { dontDisableStatic = true; }))
27-
.override { enableSystemd = false; gssSupport = false; };
28-
26+
postgresql = (prev.postgresql.overrideAttrs (old: {
27+
dontDisableStatic = true;
28+
# the following is needed becuase libicu links against stdc++
29+
NIX_LDFLAGS = "--push-state --as-needed -lstdc++ --pop-state";
30+
# without this collate.icu.utf8, and foreign_data will fail.
31+
LC_CTYPE = "C";
32+
})).override { enableSystemd = false; gssSupport = false; };
33+
2934
openssl = prev.openssl.override { static = true; };
3035

3136
icu = (prev.icu.overrideAttrs (old: { configureFlags = old.configureFlags ++ [ "--enable-static" "--disable-shared" ]; }));

0 commit comments

Comments
 (0)