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 +10 −3 Original line number Diff line number Diff line Loading @@ -19,18 +19,25 @@ in buildGoModule (finalAttrs: { pname = "searchix"; version = "0.4.4"; version = "0.4.5"; src = fetchFromGitea { domain = "codeberg.org"; owner = "alinnow"; repo = "searchix"; tag = "v${finalAttrs.version}"; hash = "sha256-R8/iR8QoeUwNQCFkr+JtoPq/iKkJRIe8dsbvGfFqinE="; hash = "sha256-2pffyKBX+ICYEN+42gwN2byjw+T9H4esi2+oTqs52GE="; }; 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 +10 −3 Original line number Diff line number Diff line Loading @@ -19,18 +19,25 @@ in buildGoModule (finalAttrs: { pname = "searchix"; version = "0.4.4"; version = "0.4.5"; src = fetchFromGitea { domain = "codeberg.org"; owner = "alinnow"; repo = "searchix"; tag = "v${finalAttrs.version}"; hash = "sha256-R8/iR8QoeUwNQCFkr+JtoPq/iKkJRIe8dsbvGfFqinE="; hash = "sha256-2pffyKBX+ICYEN+42gwN2byjw+T9H4esi2+oTqs52GE="; }; 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