temporal: Add patch to fix Darwin panic for versionCheckHook

This commit is contained in:
Jonathan Davies
2026-01-04 13:37:04 +00:00
parent aaa57eda49
commit 1b2df5ad99
2 changed files with 28 additions and 1 deletions
@@ -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)
}
+8 -1
View File
@@ -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" ];