From a16221966874ed2db7ecfcf8f0d5bf413a0a5555 Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Mon, 9 Feb 2026 19:38:58 +0000 Subject: [PATCH] Revert "fix: add NixOS compatibility for electron startup (#23)" (#42) This reverts commit 3eb9b8e84bf05debf9843b80c468911fd095f4a0. Signed-off-by: izzy --- package.json | 3 +-- start.sh | 21 --------------------- 2 files changed, 1 insertion(+), 23 deletions(-) delete mode 100755 start.sh diff --git a/package.json b/package.json index add0e78..12cd83b 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,7 @@ "main": ".vite/build/main.js", "repository": "stoatchat/desktop", "scripts": { - "start": "./start.sh", - "start:forge": "electron-forge start", + "start": "electron-forge start", "package": "electron-forge package", "make": "electron-forge make", "publish": "electron-forge publish", diff --git a/start.sh b/start.sh deleted file mode 100755 index 14676ec..0000000 --- a/start.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -# Check if we're on NixOS and set up electron path if needed -if [ -f /etc/NIXOS ] || [ -n "$NIX_STORE" ]; then - # We're on NixOS, need to find the electron path - # Try to find electron in nix store matching our version requirement - REQUIRED_VERSION=$(grep '"electron"' package.json | sed -E 's/.*"electron"[[:space:]]*:[[:space:]]*"([0-9]+)\..*/\1/') - - # Search for electron in nix store - ELECTRON_PATH=$(ls -d /nix/store/*electron-${REQUIRED_VERSION}* 2>/dev/null | grep -v -E '(unwrapped|\.drv$)' | head -1) - - if [ -n "$ELECTRON_PATH" ] && [ -d "$ELECTRON_PATH/bin" ]; then - export ELECTRON_OVERRIDE_DIST_PATH="$ELECTRON_PATH/bin" - echo "NixOS detected: Using electron from $ELECTRON_PATH/bin" - else - echo "Warning: Could not find electron ${REQUIRED_VERSION} in nix store" - fi -fi - -# Run electron-forge directly to avoid recursion -exec npx electron-forge start "$@" \ No newline at end of file