Small status update / experience report:
I was exploring the
portable-nix route, and it indeed works. But my build times were 10min, four of which seem to be downloading
nixpkgs and evaluating the derivation, then maybe 8 downloading all the build dependencies (granted, GHC and saxonb are not small), and then just a bit doing the actual work.
I tried to speed it up by using a remote builder (nixbuild.net), which was a bit of a hassle (ssh keys too large to fit in the secret env vars, so encrypting them in the repo and storing the decryption key in the env) but in the end that didn’t quite help: It seems that
./nix-portable nix-build --store ssh-ng://eu.nixbuild.net --option builders-use-substitutes true --max-jobs 0 --builders "ssh://eu.nixbuild.net x86_64-linux - 100 1 big-parallel,benchmark"
will still download all the build dependencies before kicking off the remote build, defeating part of the purpose of using a remote builder here. (This seems silly, the build dependencies are never needed locally – am I doing this wrongly)?
I might try to throw the nix cache into netlify’s cache, maybe that helps.
I just found out that another feature I was hoping to use in netlify doesn’t actually work, so maybe I’ll cease my netlify experiments, we’ll see.