Skip to content

Conversation

@wvandeun
Copy link
Contributor

@wvandeun wvandeun commented Feb 2, 2026

Summary by CodeRabbit

  • Chores
    • Updated development environment configuration to streamline package management and improve library path handling for the build setup.

@wvandeun wvandeun requested a review from ogenstad February 2, 2026 10:27
@wvandeun wvandeun self-assigned this Feb 2, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 2, 2026

Walkthrough

The change modifies flake.nix to refactor the buildInputs configuration. Instead of explicitly referencing individual packages, the file now uses a with pkgs; block containing git, gh, vale, and stdenv.cc.cc.lib. Additionally, the shell configuration now sets LD_LIBRARY_PATH to include the C compiler library via pkgs.lib.makeLibraryPath. The shellHook logic remains unchanged functionally. The modification adds 8 lines while removing 4 lines.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding libstdc++ (via LD_LIBRARY_PATH) to flake.nix to support Python dependencies with compiled library requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 2, 2026

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

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

View logs

Copy link

@coderabbitai coderabbitai bot left a 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.

Comment on lines +30 to +32
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
pkgs.stdenv.cc.cc.lib
];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
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.

@wvandeun wvandeun merged commit 08e591d into stable Feb 2, 2026
15 checks passed
@wvandeun wvandeun deleted the wvd-20260202-update-nix-flake branch February 2, 2026 20:58
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.

2 participants