Cache in CI - Nix

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

TheMatten

I'm trying to build polysemy in CI on https://builds.sr.ht/~thematten/job/344671, but (using nix-env -iA) it seems to build everything from source, which is not what I see on my devices - am I missing something or is it ignoring nixpkgs cache?

Rizary

You need to put your cache somewhere and call it again when building that. For example, you use cachix, you build polysemy in your machine and push the build into the cachix. Then, in your CI, you use your cachix's credentials and then you build the project. It will automatically download from the cache.

Torsten Schmits

this is about dependencies that should be in cache.nixos.org