From 2ce73120050fc0f641594e0513bf2ebf8d766545 Mon Sep 17 00:00:00 2001 From: Emily Trau Date: Tue, 19 Mar 2024 13:44:27 +1100 Subject: [PATCH] drawio: fix darwin signing failure --- pkgs/applications/graphics/drawio/default.nix | 8 ++++++++ pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/drawio/default.nix b/pkgs/applications/graphics/drawio/default.nix index 20f061c50e04..b9c56a01e006 100644 --- a/pkgs/applications/graphics/drawio/default.nix +++ b/pkgs/applications/graphics/drawio/default.nix @@ -6,6 +6,7 @@ , copyDesktopItems , prefetch-yarn-deps , makeWrapper +, autoSignDarwinBinariesHook , nodejs , yarn , electron @@ -23,6 +24,11 @@ stdenv.mkDerivation rec { hash = "sha256-+TCnVXcmAEpa7MiL0dyeoh2aUfIIO8eze9pEaHgKnME="; }; + # `@electron/fuses` tries to run `codesign` and fails. Disable and use autoSignDarwinBinariesHook instead + postPatch = '' + sed -i -e 's/resetAdHocDarwinSignature:.*/resetAdHocDarwinSignature: false,/' build/fuses.js + ''; + offlineCache = fetchYarnDeps { yarnLock = src + "/yarn.lock"; hash = "sha256-QS0bkDDQq3sn79TQ+pTZsmbmXgMccyLmlPLTsko7eGg="; @@ -35,6 +41,8 @@ stdenv.mkDerivation rec { yarn ] ++ lib.optionals (!stdenv.isDarwin) [ copyDesktopItems + ] ++ lib.optionals stdenv.isDarwin [ + autoSignDarwinBinariesHook ]; ELECTRON_SKIP_BINARY_DOWNLOAD = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e538b399da7d..331d994bccd8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30798,7 +30798,9 @@ with pkgs; drawing = callPackage ../applications/graphics/drawing { }; - drawio = callPackage ../applications/graphics/drawio { }; + drawio = callPackage ../applications/graphics/drawio { + inherit (darwin) autoSignDarwinBinariesHook; + }; drawio-headless = callPackage ../applications/graphics/drawio/headless.nix { }; drawpile = libsForQt5.callPackage ../applications/graphics/drawpile { };