From 8764644b3efc3850e2791c814a0e0317076ea162 Mon Sep 17 00:00:00 2001 From: Bryton Hall Date: Wed, 26 Jul 2023 15:11:20 -0400 Subject: [PATCH] logseq: match upstream electron version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using even one major version newer than upstream (in this case, electron_25) throws the following error: 14:32:04.753 › Error: The module '/nix/store/rb68ym23xwpcka6ngn0c77xjh7imrzm5-logseq-0.9.11/share/logseq/resources/app/node_modules/better-sqlite3/build/Release/better_sqlite3.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 114. This version of Node.js requires NODE_MODULE_VERSION 116. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`).: logseq_local_/home/user/notes --- pkgs/applications/misc/logseq/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/logseq/default.nix b/pkgs/applications/misc/logseq/default.nix index 01b8cab1576..c91f47b11af 100644 --- a/pkgs/applications/misc/logseq/default.nix +++ b/pkgs/applications/misc/logseq/default.nix @@ -3,7 +3,8 @@ , fetchurl , appimageTools , makeWrapper -, electron +# graphs will not sync without matching upstream's major electron version +, electron_24 , git , nix-update-script }: @@ -56,7 +57,7 @@ in { postFixup = '' # set the env "LOCAL_GIT_DIRECTORY" for dugite so that we can use the git in nixpkgs - makeWrapper ${electron}/bin/electron $out/bin/${pname} \ + makeWrapper ${electron_24}/bin/electron $out/bin/${pname} \ --set "LOCAL_GIT_DIRECTORY" ${git} \ --add-flags $out/share/${pname}/resources/app \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"