hnix is a parser & evaluator and generating/pretty printing nix expressions is just a side-effect of its functionality. Thus it has a giant amount of dependencies, and given that the Haskell ecosystem is prone to breakage (upper version bounds …), being able to build hnix from nixpkgs is a gamble.
We only generate a few nix expressions, which are relatively simple to string-concatenate, even with a little helper. Since nix is context-free and not whitespace-sensitive, simple interpolation of expressions is always correct.
hnix is a parser & evaluator and generating/pretty printing nix expressions is just a side-effect of its functionality. Thus it has a giant amount of dependencies, and given that the Haskell ecosystem is prone to breakage (upper version bounds …), being able to build hnix from nixpkgs is a gamble.
We only generate a few nix expressions, which are relatively simple to string-concatenate, even with a little helper. Since nix is context-free and not whitespace-sensitive, simple interpolation of expressions is always correct.