News for hackers. Stuff that matters.
Re:The Magic Nix Cache, a GitHub Action for speeding up your... by biggestlou on Monday June 26, 2023 @07:29PM (#36487212)
You may find something like node2nix helpful (https://github.com/svanderburg/node2nix). This converts your package.json into a Nix expression that can then be cached. You're right that it does require some setup and a bit of Nix knowledge but could yield significant benefits and take a good chunk out of that 20 minutes.

Another option might be to use pnpm instead of Yarn and cache your pnpm dependencies. pnpm actually works a bit like Nix in that it creates a pnpm-lock.yaml file with content-based hashes for the full package.json dependency tree. This enables it to quickly determine which parts of the dependency tree it needs to build and which are already available.

Re:The Magic Nix Cache, a GitHub Action for speeding up your... by soraminazuki on Monday June 26, 2023 @09:52PM (#36488079)
Nowadays, there's buildNpmPackage [1]. It's included in Nixpkgs, actively maintained, and easier to work with IMO.

[1]: https://github.com/NixOS/nixpkgs/blob/master/doc/languages-f...