Skip to content

wrap with FHS for subcommands that run embedded executable #5

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hallettj
Copy link
Collaborator

@hallettj hallettj commented May 7, 2025

The package in this repo provides a precompiled, statically-linked binary. However although the main binary is statically-linked, it includes an embedded binary that is required for some subcommands that is dynamically linked. This means that those subcommands don't work on NixOS if the user is not using nix-ld.

The embedded binary does not have any runtime dependencies - it only needs its interpreter, ld. Ideally we would patch the binary to replace references of the form /lib64/ld-linux-x86-64.so.2 with corresponding nix store paths. But I don't know how to do that. So instead this change wraps the binary with an FHS which makes the interpreter available at the expected path in a fake filesystem.

I also refactored flake.nix to remove the use of flake-utils just because I prefer it this way.

Fixes hasura/graphql-engine#10725

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fails to initialize project on nixos
1 participant