Node.js packaging tool for Yarn v2

Hi all,

There are already some solutions out there for packaging Node.js projects (like node2nix for npm, or yarn2nix for Yarn v1), but I don’t believe there are any for Yarn v2 projects, so I decided to start one.

https://github.com/stephank/yarn-plugin-nixify

Compared to other solutions, this uses the plugin system in Yarn v2, which lends itself really well to this sort of thing. Especially because, once installed, it can keep your Nix expression up-to-date automatically as you make changes to dependencies, without having to run separate commands.

At the time of writing, it requires a Yarn build from master, and the readme tells you how to get that set up. Hopefully soon we’ll have a Yarn 2.1.2 or 2.2.0 release that’ll work out-of-the-box. :slight_smile:

2 Likes

Looks like Yarn 2.2 was just released, and the plugin now works on normal Yarn release builds! I’ve updated the readme instructions to match. :tada:

2 Likes