Skip to content

Add nix flake#26

Merged
rs545837 merged 1 commit into
mainfrom
add-nix-flake
May 22, 2026
Merged

Add nix flake#26
rs545837 merged 1 commit into
mainfrom
add-nix-flake

Conversation

@rs545837

Copy link
Copy Markdown
Member

Summary

  • Add flake.nix, shell.nix, and package.nix matching the structure used in sem and weave

Closes #9

Matches the flake structure used in sem and weave.

Closes #9
@vercel

vercel Bot commented May 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
inspect Ready Ready Preview, Comment May 22, 2026 3:55am
site Ready Ready Preview, Comment May 22, 2026 3:55am

Request Review

@inspect-review inspect-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

inspect review

Triage: 6 entities analyzed | 0 critical, 0 high, 0 medium, 6 low
Verdict: standard_review

Findings (7)

  1. [low] flake.nix line 28: Variable shadowing bug - 'self' parameter shadows the 'self' from outer scope (line 11), breaking access to the flake's self reference
  2. [low] flake.nix line 36: Variable shadowing bug - 'pkgs' is redefined in the let binding, shadowing the 'pkgs' parameter from perSystem (line 29), which will cause the parameter to be ignored
  3. [low] package.nix and shell.nix: Reference to undefined 'rust-bin' - rust-overlay is imported in flake.nix but not available in the standalone package.nix/shell.nix contexts when called with default
  4. [low] package.nix line 28: 'clang' is redundantly listed in nativeBuildInputs when 'llvmPackages.clang' already provides it, but more critically, clang should not be in nativeBuildInputs for a Rust build - this is a configuration error
  5. [low] package.nix line 32: 'pkg-config' is incorrectly listed in buildInputs when it should only be in nativeBuildInputs (where it already appears on line 24) - pkg-config is a build tool, not a runtime dependency
  6. [low] package.nix line 34: Rust toolchain should not be in buildInputs - rustPlatform.buildRustPackage already provides the Rust compiler, adding it here will cause conflicts
  7. [low] package.nix line 32: pkg-config listed in both nativeBuildInputs and buildInputs, which is incorrect - it should only be in nativeBuildInputs as a build-time tool

Reviewed by inspect | Entity-level triage found 0 high-risk changes

Comment thread package.nix
version = let
crate_name = pname + "-cli";
in
(builtins.fromTOML (lib.readFile "${src}/crates/${crate_name}/Cargo.toml")).package.version;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
(builtins.fromTOML (lib.readFile "${src}/crates/${crate_name}/Cargo.toml")).package.version;
(builtins.fromTOML (builtins.readFile "${src}/crates/${crate_name}/Cargo.toml")).package.version;

Using non-existent lib.readFile instead of builtins.readFile causes Nix evaluation failure

Fix on Vercel

@rs545837 rs545837 merged commit 90a8a5d into main May 22, 2026
5 checks passed
@rs545837 rs545837 deleted the add-nix-flake branch May 22, 2026 04:44
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.

Add nix flake

1 participant