How to use a local directory as a nix binary cache?

… but only on linux? I have macOS and this is the result I get:

$ nix-build --store $HOME something.nix
[… snip]
**error:** building using a diverted store is not supported on this platform