From e4c0b24cfa0604fb7bc601c61994845d0ad53a4a Mon Sep 17 00:00:00 2001 From: Sean D Gillespie Date: Fri, 11 Oct 2024 14:23:13 -0400 Subject: [PATCH] Fix: Fix postgresql static --- flake.nix | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index f62c1a8..8547c60 100644 --- a/flake.nix +++ b/flake.nix @@ -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 = [