ELSEIF
Your brief EB
453 stories from 156 feeds 852 clusters Refreshed 12 minutes ago next pull 21:24

DEV TOOLS Signal 526 2 feeds carried it

Nixpkgs now supports version-range queries with grail SAT solver

Illustration only Photo by Anton Savinov on Unsplash

Engineers can query nixpkgs for revisions satisfying version ranges using the grail tool.

WHY IT MATTERS

This capability turns nixpkgs from a version-less store into a searchable space where dependency constraints can be satisfied, enabling reproducible builds that match upstream intentions. It also shows that adding version ranges makes the underlying problem NP-hard, requiring a SAT solver and incurring computational cost.

Written by elseif from the cluster below · every claim links back to a source

The three things worth knowing

01

The grail tool introduces a Spack-flavored query language (@, ^, etc.) for expressing version ranges and coexistence groups.

02

Queries are solved by a SAT solver that searches the nixpkgs-multiverse archive of over 309 000 package-versions across 1 541 revisions.

03

While exact-pin solving remains O(n log n), version-range solving is NP-hard and may require significant computation time.

THE READ

What the cluster adds up to.

ORIGINAL ANALYSIS

The primary change is the addition of version-range querying to nixpkgs via the grail tool. Engineers can now write expressions such as python3@>=3.10 ^[email protected].* and obtain a specific revision where both constraints hold simultaneously. This shifts nixpkgs from a static, version-less attribute set to a searchable space of historical package versions.

Adopting this feature brings a computational cost. Exact-pin queries were previously solvable in O(n log n) time, but version-range queries reduce to a boolean satisfiability problem that is NP-hard. The grail tool therefore relies on an external SAT solver, which can increase runtime and memory usage compared with the previous lightweight approach.

The solution works only as long as the required versions exist in the nixpkgs-multiverse archive. If no revision satisfies a given set of constraints, the solver will return no result. Although the tool supports date ranges and glibc eras via the --one-glibc flag, its answers are limited to the revisions stored in the multiverse, meaning it cannot infer compatibility beyond the archived history.

Community feeds highlight both the novelty and the familiarity of the approach. While the concept of version ranges is well established in ecosystems like npm, cargo, pip, and Spack, its introduction to nixpkgs marks a significant shift for a system that traditionally avoided dependency solving. The discussion indicates interest in applying the technique to real-world build reproducibility and dependency analysis.

Written by elseif from the cluster below · checked for specifics the sources never contained

THE CLUSTER

Same story, 2 feeds.

ORDERED BY FIRST SEEN
Farid Zakaria’s Blog The holy grail of nixpkgs: version ranges Open ↗
Farid Zakaria’s Blog via Lobsters The holy grail of nixpkgs: version ranges Open ↗