notion-app: bump version, restore to working
This commit is contained in:
parent
490fac55f2
commit
4ed7283490
2 changed files with 10 additions and 11 deletions
|
@ -62,7 +62,7 @@ with pkgs;
|
||||||
krita
|
krita
|
||||||
xournalpp
|
xournalpp
|
||||||
kdePackages.itinerary
|
kdePackages.itinerary
|
||||||
#deprekages.notion-app
|
deprekages.notion-app
|
||||||
|
|
||||||
# PDFs.
|
# PDFs.
|
||||||
(zathuraPkgs.override { useMupdf = false; }).zathuraWrapper
|
(zathuraPkgs.override { useMupdf = false; }).zathuraWrapper
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
asar,
|
asar,
|
||||||
writeScriptBin,
|
writeScriptBin,
|
||||||
bash,
|
bash,
|
||||||
|
libgcc
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
better-sqlite3-version = "11.3.0";
|
better-sqlite3-version = "11.4.0";
|
||||||
bufferutil-version = "4.0.8";
|
electron-version = "130";
|
||||||
electron-version = "125";
|
|
||||||
|
|
||||||
notion-app-unwrapped = stdenv.mkDerivation rec {
|
notion-app-unwrapped = stdenv.mkDerivation rec {
|
||||||
name = "notion-app-unwrapped";
|
name = "notion-app-unwrapped";
|
||||||
|
@ -24,12 +24,7 @@ let
|
||||||
|
|
||||||
betterSqlite3 = fetchzip {
|
betterSqlite3 = fetchzip {
|
||||||
url = "https://github.com/WiseLibs/better-sqlite3/releases/download/v${better-sqlite3-version}/better-sqlite3-v${better-sqlite3-version}-electron-v${electron-version}-linux-x64.tar.gz";
|
url = "https://github.com/WiseLibs/better-sqlite3/releases/download/v${better-sqlite3-version}/better-sqlite3-v${better-sqlite3-version}-electron-v${electron-version}-linux-x64.tar.gz";
|
||||||
hash = "sha256-6obP+VIJiRxN3Mmy1+A+k9KkoB8iBbbaDJ+cdznjVig=";
|
hash = "sha256-NMFE8lgXSz5vzHa37/ioaL8iY2SW8vUGA3oEgv/OISk=";
|
||||||
};
|
|
||||||
|
|
||||||
bufferUtil = fetchzip {
|
|
||||||
url = "https://github.com/websockets/bufferutil/releases/download/v${bufferutil-version}/v${bufferutil-version}-linux-x64.tar";
|
|
||||||
hash = "sha256-uNvLdiXDqtaKYLfCiwcWNTYjPbAvN2mjDlAK7c8WMY0=";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -39,14 +34,16 @@ let
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
7zz x $src || true
|
7zz x $src || true
|
||||||
|
mv "Notion Installer" Notion
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
ls -lah **/*
|
||||||
|
|
||||||
asar e "Notion/Notion.app/Contents/Resources/app.asar" asar_patched
|
asar e "Notion/Notion.app/Contents/Resources/app.asar" asar_patched
|
||||||
|
|
||||||
# replace the native dependencies with linux versions
|
# replace the native dependencies with linux versions
|
||||||
cp "$betterSqlite3/Release/better_sqlite3.node" "asar_patched/node_modules/better-sqlite3/build/Release/"
|
cp "$betterSqlite3/Release/better_sqlite3.node" "asar_patched/node_modules/better-sqlite3/build/Release/"
|
||||||
cp "$bufferUtil/node.napi.node" "asar_patched/node_modules/bufferutil/build/Release/bufferutil.node"
|
|
||||||
|
|
||||||
# fully disabling auto updates
|
# fully disabling auto updates
|
||||||
sed -i 's/if("darwin"===process.platform){const e=s.systemPreferences?.getUserDefault(E,"boolean"),t=_.Store.getState().app.preferences?.isAutoUpdaterDisabled;return Boolean(e||t)}return!1/return!0/g' "asar_patched/.webpack/main/index.js"
|
sed -i 's/if("darwin"===process.platform){const e=s.systemPreferences?.getUserDefault(E,"boolean"),t=_.Store.getState().app.preferences?.isAutoUpdaterDisabled;return Boolean(e||t)}return!1/return!0/g' "asar_patched/.webpack/main/index.js"
|
||||||
|
@ -88,6 +85,8 @@ stdenv.mkDerivation rec {
|
||||||
runScript = writeScriptBin "notion-app" ''
|
runScript = writeScriptBin "notion-app" ''
|
||||||
#!${bash}/bin/bash
|
#!${bash}/bin/bash
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${libgcc.lib}/lib
|
||||||
|
|
||||||
# Enable Wayland when appropriate.
|
# Enable Wayland when appropriate.
|
||||||
[[ $NIXOS_OZONE_WL -eq 1 ]] && WL_ARGS="--enable-features=UseOzonePlatform --ozone-platform=wayland" || WL_ARGS=""
|
[[ $NIXOS_OZONE_WL -eq 1 ]] && WL_ARGS="--enable-features=UseOzonePlatform --ozone-platform=wayland" || WL_ARGS=""
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue