I poked around a bit:
-
My development machine running NixOS 21.11 and nix 2.5.0pre20211206_d1aaa7e: the error appears.
-
Brand new VM with Debian 11 and Nix 2.6.1: NO ERROR.
-
Brand new VM with Debian 11 and Nix 2.5.0: NO ERROR.
-
Brand new VM with Debian 11 and Nix 2.4: THE ERROR APPEARS.
edit: added result for Nix 2.4
The second commit (6ed1d4343e3df69b6d1b860397273d7284d6b8e0
) already exhibits this behaviour. I can try to trim it down even further if you’re interested, but given the above information about the Nix versions, perhaps this isn’t worth the effort.
Indeed, this was pointed out to me recently, but it hasn’t quite sunk in, or rather, old habits/beliefs take time to fade. Thanks for reminding me.