I'm really glad for all the Nix based tooling that Roc uses, except for when I install Roc using Nix and have to compile it from source again on every update.
What do people think about having a binary cache using Cachix and using the Roc CI pipeline to push binaries to it? To use the cache, you'd just add the URL and key to your Nix config, see the Hyprland docs for an example.
The alternative would be to get Roc into nixpkgs once Roc has a numbered release, then the builds will be cached by Hydra. How close are we to the first numbered release?
to get Roc into nixpkgs once Roc has a numbered release, then the builds will be cached by Hydra. How close are we to the first numbered release?
Until we have numbered releases we could just put up a nix release with the current date in the version field. I've seen other nix packages do this too. In #5360 at the bottom I've mentioned the work that needs to be done for a nix release.
What do people think about having a binary cache using Cachix and using the Roc CI pipeline to push binaries to it?
Does cachix still have a free tier? I can't find any mention of that anymore.
Anton said:
we could just put up a nix release with the current date in the version field. I've seen other nix packages do this too. In #5360 at the bottom I've mentioned the work that needs to be done for a nix release.
Oh, interesting, if nixpkgs doesn't mind having pre-release software then that might be a good way to go, my only concern would be how often the package could be updated. I believe it takes a while for PRs to nixpkgs to get merged, so breaking changes in the Roc language might not be reflected in nixpkgs for a while.
Anton said:
Does cachix still have a free tier? I can't find any mention of that anymore.
Yes, it's tricky to find, but on their pricing page they say:
Users have a free 5 GB limit for open source projects.
I think this would be enough to cache ~30 nightly builds of Roc with all combinations of Linux/MacOS and ARM/x86.
so breaking changes in the Roc language might not be reflected in nixpkgs for a while.
I think that's acceptable
I think this would be enough to cache ~30 nightly builds of Roc with all combinations of Linux/MacOS and ARM/x86.
Awesome, I'll try to set it up by the end of next week
@Hannes I've set up the cachix cache, you only need to execute cachix use roc-lang once, and then nix build will use it. If you happen to be on the main branch you may not have a commit that was used to build the nightly, so it will not be cached. I'll provide a link on friday where you can easily check which commits are cached.
I'll provide a link on friday where you can easily check which commits are cached.
Today did not go as planned :sweat_smile: I'll try to do this tomorrow.
That's okay, for now I've managed to find a commit to pin my flake input to that seems to work with the cache. Will be nice to have an easy way to check when I want to upgrade :)
Voila, https://github.com/Anton-4/roc-nix-push-cachix/blob/main/Roc-commits-in-cache.txt should now be updated daily :)
Last updated: Jun 16 2026 at 16:19 UTC