wrap with FHS for subcommands that run embedded executable #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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