mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
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
This commit is contained in:
parent
3140fa89c5
commit
5a0be78562
@ -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 ''
|
||||
|
@ -61,7 +61,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
sed -i 's,/etc/protocols,${iana-etc}/etc/protocols,' src/net/lookup_unix.go
|
||||
'' + lib.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
|
||||
|
||||
# Find the loader dynamically
|
||||
LOADER="$(find ${lib.getLib libc}/lib -name ld-linux\* | head -n 1)"
|
||||
|
Loading…
Reference in New Issue
Block a user