HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
madjam002
yarnpnp2nix
Nix2023–2023
madjam002 / yarnpnp2nix

yarnpnp2nix

A performance focused and space efficient way of packaging NodeJS applications with Nix

2Distinct people
2Mentions
0Explicit recommenders
51GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A performance focused and space efficient way of packaging NodeJS applications with Nix

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by day2 dated mentions

Observed mentions: 2023-05-08 06:19:44 UTC to 2023-05-19 14:42:28 UTC.

012023-05-08 00:00:00 UTC to 2023-05-09 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsMay 82023-05-09 00:00:00 UTC to 2023-05-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-10 00:00:00 UTC to 2023-05-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-11 00:00:00 UTC to 2023-05-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-12 00:00:00 UTC to 2023-05-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-13 00:00:00 UTC to 2023-05-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsMay 132023-05-14 00:00:00 UTC to 2023-05-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-15 00:00:00 UTC to 2023-05-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-16 00:00:00 UTC to 2023-05-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-17 00:00:00 UTC to 2023-05-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-18 00:00:00 UTC to 2023-05-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-19 00:00:00 UTC to 2023-05-20 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsMay 19

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
May 82023-05-08 00:00:00 UTC2023-05-09 00:00:00 UTC101
May 92023-05-09 00:00:00 UTC2023-05-10 00:00:00 UTC000
May 102023-05-10 00:00:00 UTC2023-05-11 00:00:00 UTC000
May 112023-05-11 00:00:00 UTC2023-05-12 00:00:00 UTC000
May 122023-05-12 00:00:00 UTC2023-05-13 00:00:00 UTC000
May 132023-05-13 00:00:00 UTC2023-05-14 00:00:00 UTC000
May 142023-05-14 00:00:00 UTC2023-05-15 00:00:00 UTC000
May 152023-05-15 00:00:00 UTC2023-05-16 00:00:00 UTC000
May 162023-05-16 00:00:00 UTC2023-05-17 00:00:00 UTC000
May 172023-05-17 00:00:00 UTC2023-05-18 00:00:00 UTC000
May 182023-05-18 00:00:00 UTC2023-05-19 00:00:00 UTC000
May 192023-05-19 00:00:00 UTC2023-05-20 00:00:00 UTC101

What Hacker News says

2 sources
I'm actually working on a blog article about our setup (or possibly a series of articles, depending on how much longer it gets), it'll be published on https://korz.dev once its done. In the meantime, here's the rough summary: - Go projects are built with https://github.com/nix-community/gomod2nix. We generate a list of internal packages a project depends on using `go list -json` that is then passed to gomod2nix's `buildGoApplication`. - Rust projects are built with https://github.com/cargo2nix/cargo2nix. We chose cargo2nix to get incremental builds, meaning that dependency builds can be shared between our Rust projects and that not all dependencies have to be rebuilt when adding/updating/removing dependencies from a project. - Node projects are far trickier if you want them to be able to share dependencies and depend on one another. We ha
Read the rest
ve found Yarn 4 (currently release candidate, not stable yet) in combination with https://github.com/madjam002/yarnpnp2nix to work best for this. Unfortunately we have to patch some package hashes of packages that contain platform-specific binaries (such as esbuild). - Container images are built with https://github.com/nlewo/nix2container instead of Nix's built-in docker tools, because nix2container allows configuration of layers and thus makes it easier to share layers between images and improve layer caching. As for integrating it into our CI pipeline, this is pretty much CI system agnostic as all you have to do is run `nix build ...` inside the pipeline, generating a `result` directory or file as an artifact that, in the case of nix2container, can be pushed to your container image registry.
In Way to get NVM working in CI/CD systems
I think the Nix language is a big barrier to entry for NixOS, I’ve used it quite a bit and still struggle to debug problems, I think lack of types or some basic type inference doesn’t help. That said I’ve had a very positive experience packaging NodeJS apps with Nix, the /nix/store lends itself very nicely to the mess that is node_modules as each NPM package can be stored once in the store and NodeJS can read the dependencies directly from /nix/store if using something like Yarn PNP, I wrote a Yarn plugin to make this a bit easier https://github.com/madjam002/yarnpnp2nix Using Nix as a development shell along with direnv makes for a very nice developer experience. The thing is though, you can get these benefits even without using NixOS, you can install Nix on various Linux distros and personally I use it on macOS. NixOS is great for serv
Read the rest
ers where reproducibility and consistency is important, personally I was never a fan of tools like Ansible that are a bit of a hack.
In NixOS: A Personal Post-Mortem

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.