jinx Nix, transpiled to TypeScript

Constraints

What jinx does not do, and the deviations it knows about. The ones that matter for nixpkgs come first.

Pure evaluation only

jinx evaluates the way nix-instantiate --pure-eval would, and a little stricter:

Compiled trees only

import resolves to a compiled module. A path outside every compiled tree is an error; there is no interpreter to fall back to. jinx eval compiles on demand into a cache so that any file on the machine works; a published nixpkgs tree is compiled ahead.

Derivation kinds

Input-addressed and fixed-output derivations, which is all of nixpkgs. __contentAddressed and __impure are errors (experimental in Nix too), and dynamic derivations are not represented.

Known deviations

Target Nix version

The runtime mirrors Nix 2.35.2: its builtins, its langVersion of 6, its hashing. Derivation hashing has not changed across Nix versions and is what parity measures; builtins that newer Nix adds are added here when nixpkgs starts to use them.

Edit this page on GitHub