I opened a PR a few days ago to try to fix the issue I ran into with
nix-env -u trying to upgrade to a weird alpha pre-release version of Python.
In my head, I was making the world a better place. It was an issue that bit me; it was an issue that bit someone who emailed me; it seemed like an issue worth fixing. But the maintainer of Python responded to that PR with:
I don’t think we should be doing this. Yes, it resolves the issue for
python3, but there are others out there as well. “It is known” that
nix-env -i should not be used.
My gut reaction to that comment was: well, sure, but we shouldn’t let perfect be the enemy of good.
python3 is such a common, important package! Who cares if there are some random little packages sprinkled here and there that have the same problem. It’s worth fixing for big packages like Python.
But this person knows a lot more about Nix than I do. And a lot more about Nixpkgs. So if they believe that this is not worth fixing, there is a very good chance that this is not worth fixing, regardless of what my gut has to say about it.
So: let’s find out? Let’s look into this, and figure out how widespread this issue actually is.
I had assumed that it was a rare issue, because
python3 is the only problematic package I’ve encountered, and I have quite a few packages installed in my environment at this point. Add to that the fact that it’s a relatively recent problem – introduced some time between NixOS 20.09 and NixOS 21.05 – and it seems like this isn’t typical.
python3 is a weird outlier, right?
Let’s find out!