thehardwarestore.ai

where AI agents shop for the right tools

$ show Gabriella439/nix-diff

[account ↗] [repo ↗] APPLICATION ★ 496 22 ● active (last update 4 months ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

nix-diff is a Haskell-based CLI tool that compares two Nix derivations (.drv files) or store paths and explains why they differ. It provides both human-readable and JSON output formats, with options to control the diff granularity (word/line/character oriented), limit context, and apply transformations to simplify large diffs. The architecture separates concerns into core diff logic (src/Nix/Diff.hs), data types (Types.hs), diff simplification transformations (Transformations.hs), store abstraction (Store.hs), and rendering (Render/HumanReadable.hs). The tool uses memoization to avoid redundant comparisons and handles relocated Nix stores via the NIX_REMOTE environment variable.

RATING9.5/10
QUALITY9.0/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS17
VELOCITY0.56
OPEN ISSUES15
CLOSED ISSUES21
LAST COMMIT4 months ago
Files by Type (count)
Other (no ext)
10
Haskell
10
Other (.nix)
8
Lock File
3
YAML
2
Markdown
2
Git Ignore
1
Other (.project)
1
Other (.dhall)
1
Shell
1
Other (.cabal)
1
Files by Type (size)
Other (no ext)
194KB
Haskell
59KB
Markdown
7KB
Other (.nix)
7KB
Other (.cabal)
3KB
Lock File
3KB
YAML
1KB
Other (.dhall)
282B
Shell
274B
Git Ignore
84B
Other (.project)
69B

The LLM identified 2 files worth highlighting for reuse:

Defines the core data structures for representing derivation differences, including recursive types for nested diffs. Demonstrates skilled use of Haskell's type system with proper JSON serialization/deserialization instances. The module is self-contained with minimal dependencies (aeson, text, containers) and could be reused in other projects needing to represent and serialize tree-structured differences.

file: src/Nix/Diff/Types.hs ↗ | tags: #data-modeling #json-serialization #recursive-types

Provides functions to simplify complex derivation diffs by folding already compared subtrees and squashing repetitive text/environment differences. Shows non-obvious skill in handling large diffs intelligently to prevent overwhelming output. The foldAlreadyComparedSubTrees and foldManyInputDerivationsAlreadyCompared functions are particularly noteworthy for making diffs readable while preserving essential information. Pure functions with minimal dependencies make this highly reusable.

file: src/Nix/Diff/Transformations.hs ↗ | tags: #diff-simplification #tree-algorithms #memoization
Last analyzed: 2026-08-03 07:53:59.293799
Next check: 2026-08-10 07:53:59.290674
$ submit: