Files
Trilium/scripts
Elian DoranandClaude Opus 4.8 cbb1d53f25 fix(desktop): make start-prod launch Electron correctly on NixOS
The `start-prod`/`start-prod-no-dir` scripts invoked the npm prebuilt
Electron binary directly (`electron dist`), which fails to load on NixOS
because it's dynamically linked against FHS system libraries that don't
exist there (libcups.so.2, libgtk-3, libnss3, ...). The dev launcher
already handles this via electron-start.mts, but prod never did.

Add scripts/electron-run-prod.mts, a build-free launcher that reuses the
same NixOS-aware getElectronPath() (preferring the Nix/nix-develop
Electron over the prebuilt binary) and sets LD_LIBRARY_PATH plus
--no-sandbox on NixOS. On all other platforms it's a transparent
`electron <args>` wrapper, so behaviour is unchanged.

Also extract the shared getNixLdLibraryPath() helper so the dev and prod
launchers stay DRY.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-18 13:29:30 +03:00
..
2026-04-22 14:43:10 +03:00