Building a Yarn Project With Nix Flake
Nix is the weirdest software I have worked with. After about a year of playing with it, I am still unsure if I should continue with my experimentations. Nonetheless, if you are interested to build a yarn project with nix, I will explain my solution.
To improve the readability of this post, there is an example project (yarn-nix-example) that demonstrates the idea.
yarn-nix-example is a basic node/yarn project that builds a static website using parcel. The root directory contains a package.json and a yarn.lock file. The traditional way to build the project is to use yarn install to fetch all the dependencies and create a node_modules directory. Then yarn build (defined in package.json) delegates to parcel the compilation of the typescript assets into a standalone javascript file.
All Dressed Programming