Repository navigation
fix: add pkg-config to Nix devShell for libffi discovery on bare machines - #9
Merged
Merged
Conversation
On the self-hosted bare Hetzner machine, the RPython/PyPy translation step for the rpylean checker fails with: ValueError: running 'pkg-config libffi --libs-only-L' failed: [Errno 2] No such file or directory and the default ['/usr/lib/libffi'] is not a valid directory The PyPy RPython translator uses `pkg-config libffi` to locate the libffi library at build time. On GitHub-hosted runners, pkg-config is pre-installed system-wide; on the bare self-hosted machine it is not. The fix adds `pkg-config` to the devShell buildInputs. The existing `libffi.dev` entry already provides the libffi.pc file, and Nix's mkDerivation devShell automatically sets PKG_CONFIG_PATH to include it. With pkg-config now in PATH, the RPython translator can successfully locate libffi from the Nix store on any machine. Co-authored-by: nomeata <[email protected]>
Copilot
AI
changed the title
[WIP] Fix CI/runtime discrepancy on self-hosted machine for libffi
fix: add pkg-config to Nix devShell for libffi discovery on bare machines
Feb 21, 2026
nomeata
approved these changes
Feb 21, 2026
nomeata
marked this pull request as ready for review
February 21, 2026 14:35
nomeata
pushed a commit
that referenced
this pull request
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
On minimal self-hosted runners (bare Hetzner), the RPython/PyPy translation step for
rpyleanfails becausepkg-configis absent from the system PATH — GitHub-hosted runners have it pre-installed, bare machines do not.The PyPy RPython translator calls
pkg-config libffi --libs-only-Lat compile time to locatelibffi. Without the binary:Changes
flake.nix: Addpkg-configtobuildInputs. The already-presentlibffi.devprovides thelibffi.pcfile; Nix'smkDerivationdevShell automatically populatesPKG_CONFIG_PATHfrombuildInputs, sopkg-configcan resolvelibffientirely from the Nix store.Original prompt
This pull request was created from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.