Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Go: update path to zoneinfo.zip #54603
A Go program compiled using nix-shell returns an error when running on a separate server and trying to load a timezone file.
Steps to reproduce
Now copy this file to another computer
The error includes the zip name due to internal reasons the Go team has, but the real problem is that nix replaced
I would be more than happy to send a Pull Request if you agree with the proposed solution of prepending instead of replacing.
$ nix-shell -p nix-info --run "nix-info -m"
version is nixos-unstable-2019-01-22
Original Go code is:
But nix changes the first entry,
This works fine if you end up running your go application in the same nix env you compiled it, but when you deploy your go program to a separate server, the path, that can look like
isn't present on the separate server and then the lookup fails.
The benefits are that those who compile and run in the same nix environment will use the nix path, but those who deploy somewhere else won't have to do any extra work.
cross referencing a thread on the mailing list about this ticket/issue
so both conversations are linked.