-
Notifications
You must be signed in to change notification settings - Fork 6
add libstdc++ to flake.nix to support Python dependencies that depend on compiled libraries #790
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
Conversation
WalkthroughThe change modifies 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying infrahub-sdk-python with
|
| Latest commit: |
b404221
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6c3642e5.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://wvd-20260202-update-nix-flak.infrahub-sdk-python.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@flake.nix`:
- Around line 30-32: The current LD_LIBRARY_PATH assignment overwrites any
user-provided value; update the assignment so it appends the existing
LD_LIBRARY_PATH instead of replacing it: compute the new prefix using
pkgs.lib.makeLibraryPath with pkgs.stdenv.cc.cc.lib and then concatenate the
existing LD_LIBRARY_PATH (if non-empty) separated by ':' so existing user paths
are preserved; locate the LD_LIBRARY_PATH entry and replace the direct
assignment with this concatenation logic.
| LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ | ||
| pkgs.stdenv.cc.cc.lib | ||
| ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid clobbering existing LD_LIBRARY_PATH.
This assignment overwrites any user-provided paths, which can break other dev tooling. Prefer appending.
✅ Suggested fix (append existing value)
- LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
- pkgs.stdenv.cc.cc.lib
- ];
+ LD_LIBRARY_PATH =
+ let
+ existing = builtins.getEnv "LD_LIBRARY_PATH";
+ in
+ pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc.lib ]
+ + (pkgs.lib.optionalString (existing != "") ":${existing}");📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ | |
| pkgs.stdenv.cc.cc.lib | |
| ]; | |
| LD_LIBRARY_PATH = | |
| let | |
| existing = builtins.getEnv "LD_LIBRARY_PATH"; | |
| in | |
| pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc.lib ] | |
| (pkgs.lib.optionalString (existing != "") ":${existing}"); |
🤖 Prompt for AI Agents
In `@flake.nix` around lines 30 - 32, The current LD_LIBRARY_PATH assignment
overwrites any user-provided value; update the assignment so it appends the
existing LD_LIBRARY_PATH instead of replacing it: compute the new prefix using
pkgs.lib.makeLibraryPath with pkgs.stdenv.cc.cc.lib and then concatenate the
existing LD_LIBRARY_PATH (if non-empty) separated by ':' so existing user paths
are preserved; locate the LD_LIBRARY_PATH entry and replace the direct
assignment with this concatenation logic.
Summary by CodeRabbit