Skip to content

Commit

Permalink
Merge pull request #297089 from emilytrau/drawio-darwin-signing
Browse files Browse the repository at this point in the history
drawio: fix darwin signing failure
  • Loading branch information
emilytrau committed Mar 20, 2024
2 parents 5cffd60 + 2ce7312 commit c22bcf9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions pkgs/applications/graphics/drawio/default.nix
Expand Up @@ -6,6 +6,7 @@
, copyDesktopItems
, prefetch-yarn-deps
, makeWrapper
, autoSignDarwinBinariesHook
, nodejs
, yarn
, electron
Expand All @@ -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=";
Expand All @@ -35,6 +41,8 @@ stdenv.mkDerivation rec {
yarn
] ++ lib.optionals (!stdenv.isDarwin) [
copyDesktopItems
] ++ lib.optionals stdenv.isDarwin [
autoSignDarwinBinariesHook
];

ELECTRON_SKIP_BINARY_DOWNLOAD = true;
Expand Down
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Expand Up @@ -30749,7 +30749,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 { };
Expand Down

0 comments on commit c22bcf9

Please sign in to comment.