Building pnpm2nix: yet another npm to nix tool
summary
pnpm2nix converts pnpm lockfiles into Nix derivations that reproduce pnpm’s actual on-disk layout, including centralized store reuse, hard links & symlinks, and graph rewriting overrides. It runs package lifecycle scripts, resolves GitHub deps to tarballs, merges dependency cycles into single derivations, and can produce a wrapped node dev environment. Real projects exercise enormous graphs (examples hit ~850 packages), which makes many small derivations and slows builds; import-from-derivation for llama JSON is used today.
AI-written summary · about
chapters (12)
- 0:00Introduction and motivation
- 1:06Node.js module system explained
- 3:34History of npm package managers
- 7:19pnpm features and advantages
- 9:25pnpm store structure and purity
- 11:14Challenges in Node.js packaging
- 14:09Building pnpm2nix tool
- 15:37Using pnpm2nix for development
- 17:05Performance and dependency issues
- 18:44Current state and future plans
- 20:39Thank you and acknowledgments
- 21:42Q&A session
