All the files in https://cache.nixos.org are packed in NAR files which makes them not directly accessible. This service allows to dowload, decompress, unpack and serve any file in the cache on the fly.
This avoids having to publish the build artifacts to two places.
- 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.
This service is deployed on https://now.sh by default.
now
To specify your own cache (eg: cachix),
now --env NAR_CACHE_URI https://<yourcache>.cachix.org/
Inside the provided nix shell run:
./start-dev
This will create a small local server with live reload that emulates now.sh
Append any store path to the hostname to fetch and unpack it on the fly. That's it.
Eg:
Contributions are welcome!
Before adding any new feature it might be best to first discuss them by creating a new issue in https://github.com/zimbatm/nar-serve/issues .
All code is licenses under the Apacke 2.0 license.