Commit Graph

6 Commits

Author SHA1 Message Date
Elian Doran
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) <noreply@anthropic.com>
2026-07-18 13:29:30 +03:00
Elian Doran
788e867a6c
fix(scripts): use flake when rebuilding Electron in postinstall script
Some checks failed
Checks / main (push) Waiting to run
CodeQL Advanced / Analyze (${{ matrix.language }}) (none, actions) (push) Waiting to run
CodeQL Advanced / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
Dev / Test development (push) Waiting to run
Dev / Build Docker image (push) Blocked by required conditions
Dev / Check Docker build (Dockerfile) (push) Blocked by required conditions
Dev / Check Docker build (Dockerfile.alpine) (push) Blocked by required conditions
/ Check Docker build (Dockerfile) (push) Waiting to run
/ Check Docker build (Dockerfile.alpine) (push) Waiting to run
/ Build Docker images (Dockerfile, ubuntu-24.04-arm, linux/arm64) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.alpine, ubuntu-latest, linux/amd64) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.legacy, ubuntu-24.04-arm, linux/arm/v7) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.legacy, ubuntu-24.04-arm, linux/arm/v8) (push) Blocked by required conditions
/ Merge manifest lists (push) Blocked by required conditions
playwright / E2E tests on ${{ matrix.name }} (arm64, linux-arm64, ubuntu-24.04-arm) (push) Waiting to run
playwright / E2E tests on ${{ matrix.name }} (x64, linux-x64, ubuntu-22.04) (push) Waiting to run
Deploy website / Build & deploy website (push) Has been cancelled
2026-04-04 12:38:23 +03:00
Elian Doran
df1b87e3ac
chore(dx/nix): fix flake partially
Some checks failed
Checks / main (push) Has been cancelled
CodeQL Advanced / Analyze (${{ matrix.language }}) (none, actions) (push) Has been cancelled
CodeQL Advanced / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Dev / Test development (push) Has been cancelled
/ Check Docker build (Dockerfile) (push) Has been cancelled
/ Check Docker build (Dockerfile.alpine) (push) Has been cancelled
playwright / main (push) Has been cancelled
Dev / Build Docker image (push) Has been cancelled
Dev / Check Docker build (Dockerfile) (push) Has been cancelled
Dev / Check Docker build (Dockerfile.alpine) (push) Has been cancelled
/ Build Docker images (Dockerfile, ubuntu-24.04-arm, linux/arm/v7) (push) Has been cancelled
/ Build Docker images (Dockerfile, ubuntu-24.04-arm, linux/arm/v8) (push) Has been cancelled
/ Build Docker images (Dockerfile, ubuntu-24.04-arm, linux/arm64) (push) Has been cancelled
/ Build Docker images (Dockerfile.alpine, ubuntu-latest, linux/amd64) (push) Has been cancelled
/ Merge manifest lists (push) Has been cancelled
2025-09-04 12:12:23 +03:00
Elian Doran
62a0a44049
chore(dx): have electron-rebuild read from path on NixOS too 2025-09-04 09:26:16 +03:00
Elian Doran
26c7f0b017
feat(dx/desktop): improve rebuilding experience on NixOS 2025-09-02 19:56:27 +03:00
Elian Doran
ae74f8ea83
feat(dx/desktop): isolate node_modules dependency 2025-09-02 10:45:42 +03:00