Nixpkgs for the frontend impaired
Nixpkgs, a repository containing over 140,000 packages built using the Nix language, has been successfully translated into TypeScript by the jinx tool. This translation preserves the exact drvPath of each package, allowing users to explore the Nix store model without needing to install Nix or its repository. The jinx tool produces TypeScript files that evaluate to the same values as their Nix counterparts, including the same thunks and derivation strings.
By converting the entire nixpkgs tree into TypeScript modules, users can leverage TypeScript's extensive tooling, editor support, and type system to interact with Nixpkgs. The evaluation of each attribute of nixpkgs' CI configuration in both jinx and Nix produced identical results, proving the faithfulness of the translation. While the translation process is slower than running Nix, the benefits of using TypeScript's tooling and editor support make this approach worthwhile for those interested in exploring the Nix store model from a different perspective.
Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.