diff options
author | Diego Medina <fmpwizard@gmail.com> | 2019-12-04 21:45:41 -0500 |
---|---|---|
committer | Diego Medina <fmpwizard@gmail.com> | 2019-12-04 21:53:15 -0500 |
commit | 5a0be78562c7de3daa450ee2c4698842e8ff7f8c (patch) | |
tree | a28e383780ec734c88ad892066c7151dc06fab55 /pkgs/development/compilers/go/1.13.nix | |
parent | 3140fa89c51233397f496f49014f6b23216667c2 (diff) | |
download | nixpkgs-5a0be78562c7de3daa450ee2c4698842e8ff7f8c.tar nixpkgs-5a0be78562c7de3daa450ee2c4698842e8ff7f8c.tar.gz nixpkgs-5a0be78562c7de3daa450ee2c4698842e8ff7f8c.tar.bz2 nixpkgs-5a0be78562c7de3daa450ee2c4698842e8ff7f8c.tar.lz nixpkgs-5a0be78562c7de3daa450ee2c4698842e8ff7f8c.tar.xz nixpkgs-5a0be78562c7de3daa450ee2c4698842e8ff7f8c.tar.zst nixpkgs-5a0be78562c7de3daa450ee2c4698842e8ff7f8c.zip |
go: do not replace path to zoneinfo.zip
Prepend the nix path to the zoneinfo.zip file and keep the original alternatives to allow go programs built using nix to run on non nix servers. see https://github.com/NixOS/nixpkgs/issues/54603
Diffstat (limited to 'pkgs/development/compilers/go/1.13.nix')
-rw-r--r-- | pkgs/development/compilers/go/1.13.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/development/compilers/go/1.13.nix b/pkgs/development/compilers/go/1.13.nix index 9e8a6601724..aad9ab9c68e 100644 --- a/pkgs/development/compilers/go/1.13.nix +++ b/pkgs/development/compilers/go/1.13.nix @@ -97,7 +97,10 @@ stdenv.mkDerivation rec { rm src/net/cgo_unix_test.go '' + optionalString stdenv.isLinux '' - sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go + # prepend the nix path to the zoneinfo files but also leave the original value for static binaries + # that run outside a nix server + sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go + '' + optionalString stdenv.isAarch32 '' echo '#!${runtimeShell}' > misc/cgo/testplugin/test.bash '' + optionalString stdenv.isDarwin '' |