Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use dynamic ruby even in static variants #174

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,9 @@
});

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: {
postInstall = old.postInstall + ''
find $out/${old.passthru.gemPath} -name exts.mk -delete
'';
});
# We don't need a ruby static build. We're only interested in producing static
# outputs, not necessarily build tools.
ruby = prev.pkgsBuildBuild.ruby;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should document why it doesn't matter that ruby is not static. We ultimately care about producing static outputs, not that the build tools closure is necessarily static.


# Tests on static postgresql are failing with:
#
Expand Down