From c9891c0fd9934f8ff59ddd0cfdaa5ab48703f599 Mon Sep 17 00:00:00 2001 From: Sai Karthik Date: Tue, 18 Aug 2026 14:43:59 +0200 Subject: [PATCH] feat: add spindle to build linux appimage Adds a spindle workflow that packages the Linux AppImage, on the microvm engine with a NixOS image. steam-run is included because Electron's prebuilt binary cannot run unpatched on NixOS; gcc, pkg-config, openssl and python are there for the node-gyp build that better-sqlite3 needed. Pins electron to an exact version, in the manifest and in electron-builder's own electronVersion, so the packaged runtime cannot drift from the one the build resolved. Squashed from 26 commits on the spindles branch. The iteration those commits record was against a tree that predates apps/desktop/main/datastore.ts moving to node:sqlite, and replaying them individually onto the current main conflicts in apps/desktop/package.json, where the lines they edit no longer exist. The `bash` prefixes they added at two call sites are omitted here; a portable shebang in scripts/timed.sh replaces them in a later commit. --- .tangled/workflows/appimage.yml | 29 +++++++++++++++++++++++++++++ apps/desktop/electron-builder.yml | 2 ++ package.json | 2 +- yarn.lock | 4 ++-- 4 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 .tangled/workflows/appimage.yml diff --git a/.tangled/workflows/appimage.yml b/.tangled/workflows/appimage.yml new file mode 100644 index 00000000..100fab2a --- /dev/null +++ b/.tangled/workflows/appimage.yml @@ -0,0 +1,29 @@ +when: + - event: ["push"] + branch: ["spindles"] + +engine: microvm +image: nixos + +dependencies: + - gcc + - pkg-config # exports PKG_CONFIG_PATH for the libraries below + - openssl # the C library + headers openssl-sys links against + - nodejs + - yarn + - python313 + - bash + - steam-run + +steps: + - name: "Install dependencies" + command: yarn install + + - name: "PWD" + command: pwd && ls -al + + - name: "Build peek" + command: yarn build + + - name: "Build peek appimage" + command: yarn workspace @peek/desktop run build:electron:dist:v2 diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml index 8df8e159..c889b2f9 100644 --- a/apps/desktop/electron-builder.yml +++ b/apps/desktop/electron-builder.yml @@ -2,6 +2,8 @@ appId: com.autonome.peek productName: Peek copyright: Copyright © 2024 Dietrich Ayala +electronVersion: "43.0.0" # pin version + # Directories directories: output: out diff --git a/package.json b/package.json index e8cef9a3..b302b3aa 100644 --- a/package.json +++ b/package.json @@ -226,7 +226,7 @@ "@playwright/test": "^1.57.0", "@types/archiver": "^6.0.0", "@types/node": "^25.0.3", - "electron": "^43.0.0", + "electron": "43.0.0", "electron-builder": "^26.15.3", "fake-indexeddb": "^6.2.5", "linkedom": "^0.18.12", diff --git a/yarn.lock b/yarn.lock index 5c221acb..d78f3c90 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2001,7 +2001,7 @@ __metadata: "@types/node": "npm:^25.0.3" archiver: "npm:^7.0.0" cross-fetch: "npm:^4.1.0" - electron: "npm:^43.0.0" + electron: "npm:43.0.0" electron-builder: "npm:^26.15.3" electron-unhandled: "npm:^5.0.0" fake-indexeddb: "npm:^6.2.5" @@ -3369,7 +3369,7 @@ __metadata: languageName: node linkType: hard -"electron@npm:^43.0.0": +"electron@npm:43.0.0, electron@npm:^43.0.0": version: 43.0.0 resolution: "electron@npm:43.0.0" dependencies: -- 2.51.2