static-haskell-nix icon indicating copy to clipboard operation
static-haskell-nix copied to clipboard

Document situations where not pinning the nix version changes outputs

Open nh2 opened this issue 5 years ago • 1 comments

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

  • During the ugprade from nix 1.* to 2.0

Output / build changes

  • Python unicode errors: https://github.com/NixOS/nixpkgs/pull/75676#issuecomment-569163012

nh2 avatar Dec 27 '19 01:12 nh2

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.

nh2 avatar Jan 27 '20 23:01 nh2