From f77112d0a782420345d167c73e39161383ea9a22 Mon Sep 17 00:00:00 2001 From: Thierry Delafontaine Date: Tue, 15 Jul 2025 23:50:45 +0200 Subject: [PATCH] mods: 1.7.0 -> 1.8.1 - Skip tests on macOS due to sandbox restrictions causing panic when reading /etc/protocols and /etc/services files - Skip generating man pages and shell completions on macOS due to the same reasons mentioned above --- pkgs/by-name/mo/mods/package.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/mo/mods/package.nix b/pkgs/by-name/mo/mods/package.nix index 81249486e604..c5ac638b9e3c 100644 --- a/pkgs/by-name/mo/mods/package.nix +++ b/pkgs/by-name/mo/mods/package.nix @@ -13,16 +13,23 @@ buildGoModule (finalAttrs: { pname = "mods"; - version = "1.7.0"; + version = "1.8.1"; src = fetchFromGitHub { owner = "charmbracelet"; repo = "mods"; tag = "v${finalAttrs.version}"; - hash = "sha256-wzLYkcgUWPzghJEhYRh7HH19Rqov1RJAxdgp3AGnOTY="; + hash = "sha256-CT90uMQc0quQK/vCeLiHH8taEkCSDIcO7Q3aA+oaNmY="; }; - vendorHash = "sha256-L+4vkh7u6uMm5ICMk8ke5RVY1oYeKMYWVYYq9YqpKiw="; + # Otherwise checks fail with `panic: open /etc/protocols: operation not permitted` when sandboxing is enabled on Darwin + # https://github.com/NixOS/nixpkgs/pull/381645#issuecomment-2656211797 + modPostBuild = '' + substituteInPlace vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go \ + --replace-quiet '!os.IsNotExist(err)' '!os.IsNotExist(err) && !os.IsPermission(err)' + ''; + + vendorHash = "sha256-jtSuSKy6GpWrJAXVN2Acmtj8klIQrgJjNwgyRZIyqyY="; nativeBuildInputs = lib.optionals (installManPages || installShellCompletions) [ installShellFiles