temporal: Add patch to fix Darwin panic for versionCheckHook
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
--- vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go
|
||||
+++ vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go
|
||||
@@ -696,7 +696,7 @@ func init() {
|
||||
// Load protocols
|
||||
data, err := ioutil.ReadFile("/etc/protocols")
|
||||
if err != nil {
|
||||
- if !os.IsNotExist(err) {
|
||||
+ if !os.IsNotExist(err) && !os.IsPermission(err) {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@@ -732,7 +732,7 @@ func init() {
|
||||
// Load services
|
||||
data, err = ioutil.ReadFile("/etc/services")
|
||||
if err != nil {
|
||||
- if !os.IsNotExist(err) {
|
||||
+ if !os.IsNotExist(err) && !os.IsPermission(err) {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@@ -19,7 +19,14 @@ buildGoModule rec {
|
||||
hash = "sha256-WiiezZ/2FgRte4BStIGHQhb5bHtfldi3TaIRG0xFtW0=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-HW2j8swbaWwU1i3udqlT8VyFreML6ZH14zWxF8L5NTQ=";
|
||||
vendorHash = "sha256-CdzcOE/J0gqUbq7BXPpLFyNPNbFTziR5j9GPdYPzv50=";
|
||||
|
||||
overrideModAttrs = old: {
|
||||
# netdb.go allows /etc/protocols and /etc/services to not exist and happily proceeds, but it panic()s if they exist but return permission denied.
|
||||
postBuild = ''
|
||||
patch -p0 < ${./darwin-sandbox-fix.patch}
|
||||
'';
|
||||
};
|
||||
|
||||
excludedPackages = [ "./build" ];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user