fix(nix): expose libstdc++ during completion install#337
Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
Pull request overview
This PR fixes a Nix sandbox build failure on Linux where shell completion generation in postInstall runs the freshly built (CUDA-free) target/release/mold before Nix fixup has patched runtime paths, causing a dynamic loader error for libstdc++.so.6.
Changes:
- Add a Linux-only
preInstallhook to exportstdenv.cc.cc.libontoLD_LIBRARY_PATHso completion generation can execute in sandboxed builders. - Document the Nix sandbox completion-generation fix in the changelog (issue #336).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
flake.nix |
Adds Linux-only preInstall that prepends stdenv.cc.cc.lib to LD_LIBRARY_PATH so postInstall completion generation can run in Nix sandbox. |
CHANGELOG.md |
Records the Linux Nix sandbox completion-generation fix and links to #336. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #337 +/- ##
==========================================
- Coverage 66.91% 66.91% -0.01%
==========================================
Files 254 254
Lines 142741 142741
==========================================
- Hits 95519 95518 -1
- Misses 47222 47223 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
preInstallhook to exposestdenv.cc.cc.libonLD_LIBRARY_PATHcargoWithProfile run ... completionshelper runnable before Nix fixup patches runtime pathsCloses #336.
Validation
nix fmtnix eval --raw .#packages.x86_64-linux.mold.preInstallnix build .#packages.x86_64-linux.mold --dry-rungit diff --checknix flake check --all-systems --no-buildcodex review --uncommitted(no findings)