Why does Stack (Haskell) keep downloading the same stuff?

(In case it’s relevant, here’s my NixOS config.)

Every day for the last few days, after restarting my computer, the first time I run stack ghci in my projects, my system has had to download a ton of stuff. For instance, my project montevideo just now started like this:

[jeff@jbb-dell:~/code/music/montevideo]$ stack ghci --ghci-options -Wall
these paths will be fetched (0.47 MiB download, 1.28 MiB unpacked):
copying path '/nix/store/k21l8caw5y607f69vvysvj5p8wcpjmb0-glpk-4.65' from 'https://cache.nixos.org'...
copying path '/nix/store/z5i9b7dxg5k5hmyspa5kdaj1c7j33zlq-pcre-8.44-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/ykbr9ci7l3qmvj6l3i68z6a8r3j5pkbf-pcre-8.44-dev' from 'https://cache.nixos.rg'...
Stack has not been tested with GHC versions above 8.6, and using 8.8.3, this may fail
Stack has not been tested with Cabal versions above 2.4, but version was found, this may fail
Cabal file warning in/home/jeff/code/music/montevideo/montevideo-monome/montevideo-monome.cabal@0:0: A package using secti
on syntax must specify at least
'cabal-version: >= 1.2'.
Decimal             > configure
Decimal             > Configuring Decimal-0.5.1...
Decimal             > build
NumInstances        > configure
Decimal             > Preprocessing library for Decimal-0.5.1..
Decimal             > Building library for Decimal-0.5.1..
Decimal             > [1 of 1] Compiling Data.Decimal
NumInstances        > Configuring NumInstances-1.4...
NumInstances        > Warning: 'ghc-prof-options: -prof' is not necessary and will lead to problems
NumInstances        > when used on a library. Use the configure flag --enable-library-profiling
NumInstances        > and/or --enable-profiling.
NumInstances        > build
StateVar            > configure
NumInstances        > Preprocessing library for NumInstances-1.4..
NumInstances        > Building library for NumInstances-1.4..
NumInstances        > [1 of 5] Compiling Data.NumInstances.PreRequisites
NumInstances        > [2 of 5] Compiling Data.NumInstances.Function

It’s been setting itself up for at least 5 minutes now. But it was working fine yesterday when I went to bed; I could stop ghci and restart and it wouldn’t download anything new. I haven’t changed anything about its relation to the external world – the cabal files, the stack files – just the code within it.

I asked on StackOverflow.