In fa48e317f3045697da72e0c888f550d5a4c5e024
I am not sure/convinced that these cross packages are cached regularly (or at all?) on cache.nixos.org:
instatiating (one of) the shell(s) first time shows:
bitcoin/worktrees/pr-35877 on pr-35877 [$] via △ v4.1.2 via 🐍 v3.14.6 via ❄️ impure (nix-shell-env)
❯ HOST=x86_64-w64-mingw32ucrt \
nix-instantiate contrib/devtools/shell-win64-cross.nix > shell.drv
unpacking 'https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-26.05.tar.gz' into the Git cache...
^[rwarning: you did not specify '--add-root'; the result might be removed by the garbage collector
bitcoin/worktrees/pr-35877 on pr-35877 [$!?] via △ v4.1.2 via 🐍 v3.14.6 via ❄️ impure (nix-shell-env) took 16s
❯ nix-store --realise --dry-run "$(cat shell.drv)"
these 14 derivations will be built:
/nix/store/0px7k59nich0bsnvjakhxjq9x93l3mkl-x86_64-w64-mingw32-nolibc-gcc-15.2.0.drv
/nix/store/x9pbpqsnk1wc2x0fb7ld7q46g7rhanl1-win-dll-hook.sh.drv
/nix/store/l3yi6dp8qcfq7yg352mfgb1m53hxkba3-x86_64-w64-mingw32-nolibc-gcc-wrapper-15.2.0.drv
/nix/store/2pnpr58w1w4b9n3104al5dsglh1lgn2k-stdenv-linux.drv
/nix/store/kviifb5frqrmfr4q17j473wvk2lz934w-mingw-w64-x86_64-w64-mingw32-13.0.0.drv
/nix/store/533n2nw3bykqiq19r1y3j23hysh5fcrg-x86_64-w64-mingw32-binutils-wrapper-2.46.drv
/nix/store/mvb6why48wvi4480sqnlqg63fdwm50lx-x86_64-w64-mingw32-nolibc-gcc-wrapper-15.2.0.drv
/nix/store/xsysspl58chfqp0ccaabjxaykwg5g3jf-stdenv-linux.drv
/nix/store/mrkwyp8z098n9xg26h2q7rsyjnai2mss-mcfgthread-x86_64-w64-mingw32-2.3.2.drv
/nix/store/44qzqs3m23py3rlinh6y14qj61dqwdk5-x86_64-w64-mingw32-gcc-14.3.0.drv
/nix/store/9pijjdxc2kmas8idahdlqzkdvqk0ckqv-win-dll-hook.sh.drv
/nix/store/jz9z9gxkfmiwqbikxg2fv7rqxyql2aj6-x86_64-w64-mingw32-gcc-wrapper-14.3.0.drv
/nix/store/kp9j507wb6vhgx8k72644q41i10l5p23-mingw_w64-pthreads-x86_64-w64-mingw32-13.0.0.drv
/nix/store/2hrpww4d9j4q9bacwd9pbbdfs04hrpdy-nix-shell.drv
These should be caught in the docker buildkit layer cache naively, but any miss there in base_install.sh or earlier will cause a rebuild of the above, I think.
We may therefore want to consider a combination of pinning the nixpkgs commit, and using cachix (docs) or similar to cache built packages on pushes to master.
Noting that this is another "account" for someone to manage and another repo secret needed, but probably worth it IMO. The cachix cache woudl also be readable for developers to use themselves, if they add the cachix cache alongside cache.nixos.org