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 = [