The holy grail of nixpkgs: version ranges
Nixpkgs, a versionless package manager, has effectively one version per attribute, making it seemingly impossible to express version range support. However, with the introduction of the multiverse, this seemingly impossible task became a reality. The multiverse effectively solves version ranges by converting them into a boolean satisfiability problem, which can then be solved by a SAT solver.
A small query language tied to a solver called grail has been developed to facilitate this process. Grail uses the Spack-flavored grammar, allowing users to specify ranges and chain constraints. The solver's plan can be visualized with the --viz flag, and unsatisfiable sets of constraints can be identified. The inclusion of the multiverse has opened up new possibilities for building software as the original author intended, providing the ability to express a range of versions that are known to work.
Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.