Unverified Commit f932deff authored by isabel's avatar isabel Committed by GitHub
Browse files

searchix: 0.4.4 -> 0.4.5 (#499349)

parents cbe59b1b de83df9c
Loading
Loading
Loading
Loading
+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)
 		}
 
+10 −3
Original line number Diff line number Diff line
@@ -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" ];
@@ -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/
  '';