Skip to content

Commit e4c0b24

Browse files
committed
Fix: Fix postgresql static
1 parent 130ed4b commit e4c0b24

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

flake.nix

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,28 @@
3939
cddl = final.callPackage ./pkgs/cddl { };
4040
});
4141

42-
tools = (final: prev: {
42+
musl = (final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isMusl {
43+
# Fix the following Ruby cross build error:
44+
#
45+
# error: output '/nix/store/6hyyk9wnnxpd5rsr6ivc0s8l1lgvsjrb-ruby-x86_64-unknown-linux-musl-3.3.4'
46+
# is not allowed to refer to the following paths:
47+
# /nix/store/c77wdd4fb0llq37bpmfr73m7s7r1j068-ruby-3.3.4
48+
#
49+
# See https://github.com/NixOS/nixpkgs/issues/347758
4350
ruby = prev.ruby.overrideAttrs (old: {
44-
# Fix the following error on musl64 Ruby:
45-
#
46-
# error: output '/nix/store/6hyyk9wnnxpd5rsr6ivc0s8l1lgvsjrb-ruby-x86_64-unknown-linux-musl-3.3.4'
47-
# is not allowed to refer to the following paths:
48-
# /nix/store/c77wdd4fb0llq37bpmfr73m7s7r1j068-ruby-3.3.4
49-
#
50-
# See https://github.com/NixOS/nixpkgs/issues/347758
5151
postInstall = old.postInstall + ''
5252
find $out/${old.passthru.gemPath} -name exts.mk -delete
5353
'';
5454
});
55+
56+
# Tests on static postgresql are failing with:
57+
#
58+
# FATAL: could not load library "/build/postgresql-16.4/.../lib/dict_snowball.so":
59+
# Error relocating /build/postgresql-16.4/tmp_install/nix/store/.../lib/dict_snowball.so:
60+
# pg_any_to_server: symbol not found
61+
postgresql = prev.postgresql.overrideAttrs (_: {
62+
doCheck = false;
63+
});
5564
});
5665
};
5766
supportedSystems = [

0 commit comments

Comments
 (0)