Commit 8764644b authored by Bryton Hall's avatar Bryton Hall
Browse files

logseq: match upstream electron version

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
parent ef99fa5c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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}}"