Nixpkgs for the frontend impaired

10 points by tuxes


tuxes

Nix is lazy, so the emitted code wraps an expression in nix.thunk(() => ...) wherever Nix would allocate a thunk. 🤮

As per a post by Gabriella, it's not clear if nixpkgs even needs the full generality of the Nix language:

nobody actually uses Nix the language at any significant scale. Instead, the community has adopted two sub-languages embedded within Nix for programming ā€œin the largeā€:

  • Nixpkgs overlays: This is an embedded language that simulates object-oriented programming with inheritance / late binding / dynamic scope (depending on how you think about it)
  • NixOS modules: This is an embedded language that roughly emulates Terraform

How far is nixpkgs from being adapted to not need the Nix language, and instead be more... declarative (!), and permit more flexibility for consumers that want to benefit from this grand collection of packaging and modules.

Rough idea: