Loading pkgs/by-name/se/searchix/darwin-sandbox-fix.patch 0 → 100644 +20 −0 Original line number Diff line number Diff line --- 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) } pkgs/by-name/se/searchix/package.nix +8 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,13 @@ buildGoModule (finalAttrs: { vendorHash = "sha256-yfcQgy4cQFRvtsyLHLojnJaWhle1ZR3unmaFQj8ljuw="; 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} ''; }; subPackages = [ "cmd/searchix-web" ]; tags = [ "embed" ]; Loading @@ -45,7 +52,7 @@ buildGoModule (finalAttrs: { cp ${simpleCss}/simple.css frontend/static/base.css ''; postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' postInstall = '' $out/bin/searchix-web generate-error-page --outdir $out/share/searchix/ ''; Loading Loading
pkgs/by-name/se/searchix/darwin-sandbox-fix.patch 0 → 100644 +20 −0 Original line number Diff line number Diff line --- 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) }
pkgs/by-name/se/searchix/package.nix +8 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,13 @@ buildGoModule (finalAttrs: { vendorHash = "sha256-yfcQgy4cQFRvtsyLHLojnJaWhle1ZR3unmaFQj8ljuw="; 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} ''; }; subPackages = [ "cmd/searchix-web" ]; tags = [ "embed" ]; Loading @@ -45,7 +52,7 @@ buildGoModule (finalAttrs: { cp ${simpleCss}/simple.css frontend/static/base.css ''; postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' postInstall = '' $out/bin/searchix-web generate-error-page --outdir $out/share/searchix/ ''; Loading