Package Details: insomnia-electron 1:10.0.0-3

Git Clone URL: https://aur.archlinux.org/insomnia-electron.git (read-only, click to copy)
Package Base: insomnia-electron
Description: Cross-platform HTTP and GraphQL Client
Upstream URL: https://github.com/Kong/insomnia
Licenses: Apache-2.0
Conflicts: insomnia
Provides: insomnia
Submitter: dusansimic
Maintainer: fmauNeko
Last Packager: fmauNeko
Votes: 3
Popularity: 0.002572
First Submitted: 2021-09-22 01:27 (UTC)
Last Updated: 2024-10-07 07:17 (UTC)

Latest Comments

void09 commented on 2023-01-15 20:16 (UTC)

@frysztak the fix worked, thanks. Any idea how to fix it for latest (2022.7.2) version ?

frysztak commented on 2022-07-15 08:28 (UTC)

electron package now points to version 19, which causes

Error: The module '/tmp/.org.chromium.Chromium.ll2m1w'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 103. This version of Node.js requires
NODE_MODULE_VERSION 106. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

the fix is to use Electron 18 (_electron=electron18 in PKGBUILD)

yakoyakoyokuyoku commented on 2022-05-21 21:03 (UTC)

For version 2022.3.0 I recommend the following patch, which has yielded into a working insomnia. Currently if we ran it under a folder that does not contain the package.json at the root of the project insomnia gets stuck at some part of the program and only displays absolutely nothing. To fix this we copy package.json to /usr/lib/insomnia and when we run electron we go to that directory.

diff --git a/PKGBUILD b/PKGBUILD
index 7a2454e..1ec137a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ _electron=electron
 _appname=insomnia
 pkgname="$_appname-electron"
 _dirname="$_appname-core"
-pkgver=2022.2.1
+pkgver=2022.3.0
 pkgrel=1
 pkgdesc='Cross-platform HTTP and GraphQL Client'
 arch=(any)
@@ -18,10 +18,10 @@ source=("$url/archive/core@$pkgver.tar.gz"
         "$_appname.sh"
         "$_appname.desktop"
         "electron_target.patch")
-sha256sums=('6aeddfead1b8a71504562278e61a5e165517308e145d7a859a2114cd412941d8'
-            '9eba2a175624d9236f9acbefffd92a5a6a64bf6250700b29684d7aa4a1057c77'
+sha256sums=('1269cd1c1a256cafb7eabc08311392cb1b65f00f036ef9843bd6e196357653cd'
+            'f2a917745a308ba985fa8c5a4b9b86974e304c003f552bd02b9c2a5ab316eb4f'
             '790a02378c36db77797669e6b58a426a037664c2680e8b29b9f606c6bb517e94'
-            'd8bd680dc7d4b56a58f28d93d54cf11ef897a2da7e09d80028ed42f94d3f08c9')
+            '4f88784abcd67190af5ff451483f7eced974b136aed6ec00eafd8e7464cd9562')

 _ensure_local_nvm() {
    # lets be sure we are starting clean
@@ -46,14 +46,16 @@ build() {
    _ensure_local_nvm
    cd "$_dirname-$pkgver"
    npm run bootstrap
-   GIT_TAG="core@$pkgver" npm run app-package
+   GIT_TAG="core@$pkgver" npm run app-package -- \
+       -- --dir -c.electronDist=$electronDist -c.electronVersion=$electronVer
 }

 package() {
    cd "$_dirname-$pkgver"

-   install -d "$pkgdir/usr/lib/$_appname"
-   cp -r "packages/$_appname-app/dist/linux-unpacked/resources/." "$pkgdir/usr/lib/$_appname"
+   install -dm755 "$pkgdir/usr/lib/$_appname"
+   cp -r "packages/$_appname-app/dist/linux-unpacked/resources" "$pkgdir/usr/lib/$_appname"
+   install -Dm644 package.json "$pkgdir/usr/lib/$_appname"

    install -Dm755 "$srcdir/$_appname.sh" "$pkgdir/usr/bin/$_appname"
    install -Dm644 "$srcdir/$_appname.desktop" -t "$pkgdir/usr/share/applications"
diff --git a/electron_target.patch b/electron_target.patch
index 5b611b9..85633c5 100644
--- a/electron_target.patch
+++ b/electron_target.patch
@@ -1,17 +1,23 @@
-diff --git a/packages/insomnia-app/config/electronbuilder.json b/packages/insomnia-app/config/electronbuilder.json
-index 7a6dd7a4..e6bb7655 100644
---- a/packages/insomnia-app/config/electronbuilder.json
-+++ b/packages/insomnia-app/config/electronbuilder.json
-@@ -79,11 +79,7 @@
-     "synopsis": "__SYNOPSIS__",
-     "category": "Development",
-     "target": [
--      "AppImage",
--      "deb",
--      "tar.gz",
--      "rpm",
--      "snap"
-+      "dir"
-     ]
-   }
- }
+--- a/packages/insomnia-app/electron-builder.config.js
++++ b/packages/insomnia-app/electron-builder.config.js
+@@ -104,19 +104,7 @@
+     category: 'Development',
+     target: [
+       {
+-        target: 'AppImage',
+-      },
+-      {
+-        target: 'deb',
+-      },
+-      {
+-        target: 'tar.gz',
+-      },
+-      {
+-        target: 'rpm',
+-      },
+-      {
+-        target: 'snap',
++        target: 'dir',
+       },
+     ],
+   },
diff --git a/insomnia.sh b/insomnia.sh
index 687bcf6..e142e3a 100644
--- a/insomnia.sh
+++ b/insomnia.sh
@@ -1,3 +1,4 @@
 #!/bin/sh

-exec @ELECTRON@ /usr/lib/insomnia/app.asar "$@"
+cd /usr/lib/insomnia
+exec @ELECTRON@ ./resources/app.asar "$@"