Skip to content

Commit

Permalink
Fix: Fix postgresql static
Browse files Browse the repository at this point in the history
  • Loading branch information
sgillespie committed Oct 11, 2024
1 parent 130ed4b commit e4c0b24
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,28 @@
cddl = final.callPackage ./pkgs/cddl { };
});

tools = (final: prev: {
musl = (final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isMusl {
# Fix the following Ruby cross build error:
#
# error: output '/nix/store/6hyyk9wnnxpd5rsr6ivc0s8l1lgvsjrb-ruby-x86_64-unknown-linux-musl-3.3.4'
# is not allowed to refer to the following paths:
# /nix/store/c77wdd4fb0llq37bpmfr73m7s7r1j068-ruby-3.3.4
#
# See https://github.com/NixOS/nixpkgs/issues/347758
ruby = prev.ruby.overrideAttrs (old: {
# Fix the following error on musl64 Ruby:
#
# error: output '/nix/store/6hyyk9wnnxpd5rsr6ivc0s8l1lgvsjrb-ruby-x86_64-unknown-linux-musl-3.3.4'
# is not allowed to refer to the following paths:
# /nix/store/c77wdd4fb0llq37bpmfr73m7s7r1j068-ruby-3.3.4
#
# See https://github.com/NixOS/nixpkgs/issues/347758
postInstall = old.postInstall + ''
find $out/${old.passthru.gemPath} -name exts.mk -delete
'';
});

# Tests on static postgresql are failing with:
#
# FATAL: could not load library "/build/postgresql-16.4/.../lib/dict_snowball.so":
# Error relocating /build/postgresql-16.4/tmp_install/nix/store/.../lib/dict_snowball.so:
# pg_any_to_server: symbol not found
postgresql = prev.postgresql.overrideAttrs (_: {
doCheck = false;
});
});
};
supportedSystems = [
Expand Down

0 comments on commit e4c0b24

Please sign in to comment.