In a setting where your CI is pushing to your nix binary cache, have you ever noticed that build artifacts usually have to be pushed a second time? What if it wasn’t necessary? nar-serve is a HTTP service that you can put in front of your cache and serve the content of the NAR files directly.
- Avoid publishing build artifacts to both the binary cache and another service.
- Allows to share build results easily.
- Inspect the content of a NAR file.
Append any store path to the hostname to fetch and unpack it on the fly. That’s it.
If that’s something you would be interested in deploying in your company, please contact me.
The source code is all freely available at https://github.com/zimbatm/nar-serve and I am available to develop extensions for it.