nh2 / static-haskell-nix

easily build most Haskell programs into fully static Linux executables
388 stars 36 forks source link

Document situations where not pinning the nix version changes outputs #72

Open nh2 opened 4 years ago

nh2 commented 4 years ago

In https://github.com/nh2/static-haskell-nix/blob/d24dea3d46a727e1cd93e67458ce2768109efe0a/static-stack2nix-builder-example/default.nix#L36 I pin the version of nix itself.

I added that in the past because the upgrade from Nix 1.* to 2.0 created (if I remember correctly) different .drv files.

I would like to document cases beyond that which resulted in different .drvs or build outputs when the version of nix changes, so that I can justify to continue pinning nix:

.drv changes

Output / build changes

nh2 commented 4 years ago

I found another situation:

https://github.com/NixOS/nixpkgs/pull/75676#issuecomment-569284177

From Nix 2.2 to 2.3, nix changed to run its builds in a TTY (PR: https://github.com/NixOS/nix/pull/2878) which can easily result in different build behaviour e.g. for Python:

Before, we'd get

('sys.stdout.encoding', None)
('sys.stdout.isatty()', False)

and afterwards we'd get

('sys.stdout.encoding', 'UTF-8')
('sys.stdout.isatty()', True)

and some code inspects that; in the linked case it led to a test failure in python2Packages.Babel.