From 62a495430046ed6326b8a5ae108eb415b4de3168 Mon Sep 17 00:00:00 2001 From: crertel Date: Wed, 6 May 2026 21:51:06 -0500 Subject: [PATCH] lmstudio: Fix signing on Darwin --- pkgs/by-name/lm/lmstudio/darwin.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/lm/lmstudio/darwin.nix b/pkgs/by-name/lm/lmstudio/darwin.nix index 2c8b21418e68..d857fb008c29 100644 --- a/pkgs/by-name/lm/lmstudio/darwin.nix +++ b/pkgs/by-name/lm/lmstudio/darwin.nix @@ -38,8 +38,10 @@ stdenv.mkDerivation { local indexJs="$out/Applications/LM Studio.app/Contents/Resources/app/.webpack/main/index.js" substituteInPlace "$indexJs" --replace-quiet "'/Applications'" "'/'" - # Re-sign the app bundle after patching, otherwise macOS reports it as damaged - codesign --force --deep --sign - "$out/Applications/LM Studio.app" + # Re-sign the main executable, otherwise macOS reports the app as damaged + appBundle="$out/Applications/LM Studio.app" + mainExe="$appBundle/Contents/MacOS/LM Studio" + codesign --force --sign - "$mainExe" runHook postInstall '';