Package Details: insomnia 10.2.0-1

Git Clone URL: https://aur.archlinux.org/insomnia.git (read-only, click to copy)
Package Base: insomnia
Description: Cross-platform HTTP and GraphQL Client
Upstream URL: https://github.com/Kong/insomnia
Licenses: MIT
Submitter: kpcyrd
Maintainer: Gobidev
Last Packager: Gobidev
Votes: 23
Popularity: 0.000572
First Submitted: 2020-10-19 17:29 (UTC)
Last Updated: 2024-11-29 12:02 (UTC)

Latest Comments

« First ‹ Previous 1 .. 4 5 6 7 8 9

neeks commented on 2019-08-13 16:03 (UTC)

PKGBUILD for anyone wanting to use electron3-bin:

# Maintainer: ccat3 <c0ldcat3z@gmail.com>
# Contributor: bruceutut <zttt183525594@gmail.com>

pkgname=insomnia-src
_name=insomnia
pkgver=6.6.2
pkgrel=1
pkgdesc="Cross-platform HTTP and GraphQL Client (Build from source)"
arch=('x86_64' 'i686')
url="https://github.com/getinsomnia/insomnia"
license=('MIT')
depends=('electron3')
provides=("$_name")
conflicts=("$_name")
source=("$_name-$pkgver.src.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('815a4c5ab70218c92aa0082afa175ef4e5dd58d2e831655a48c960ecb64d6665')

prepare() {
    cd "$_name-$pkgver/packages/insomnia-app"

    # Make electron version to match community/electron
    electronV=$(electron3 --version)
    electronVer=${electronV#v}
    sed -i "/\"electron\": \"/c\\\"electron\": \"$electronVer\"," package.json

    # Edit electron builder config
    electronLib=$(basename $(find /usr/lib -maxdepth 1 -name "electron3*"))

    sed -i 's/"AppImage",//' .electronbuilder
    sed -i 's/"deb",//' .electronbuilder
    sed -i 's/"tar.gz",//' .electronbuilder
    sed -i 's/"snap",//' .electronbuilder
    sed -i 's/"rpm"/"dir"/' .electronbuilder
    sed -i "s/\"appId\": \"com.insomnia.app\",/\"appId\": \"com.insomnia.app\",\"electronDist\": \"\/usr\/lib\/$electronLib\",/" .electronbuilder
}

build() {
    cd "$_name-$pkgver"
    npm run bootstrap
    npm run app-package
}

package() {
    cd "$srcdir/$_name-$pkgver/packages/insomnia-app/dist/linux-unpacked"

    # Install asar files
    install -Dm644 resources/app.asar "$pkgdir/usr/share/insomnia/app.asar"
    install -Dm644 resources/bin/yarn-standalone.js "$pkgdir/usr/share/insomnia/bin/yarn-standalone.js"

    cd "$srcdir/$_name-$pkgver/packages/insomnia-app/build"

    # Install start script
    echo "#!/usr/bin/env sh
exec electron3 /usr/share/insomnia/app.asar \$@
" > "$srcdir/insomnia.sh"
    install -Dm755 "$srcdir/insomnia.sh" "$pkgdir/usr/bin/insomnia"

    # Install desktop file
    echo "[Desktop Entry]
Name=Insomnia
Comment=Debug APIs like a human, not a robot
Exec=insomnia %U
Terminal=false
Type=Application
Icon=insomnia
MimeType=x-scheme-handler/insomnia;
Categories=Development;
" > "$srcdir/insomnia.desktop"
    install -Dm644 "$srcdir/insomnia.desktop" "$pkgdir/usr/share/applications/insomnia.desktop"

    # Install icons
    cd icons
    for size in 16 32 48 128 256 512; do
        install -Dm644 ${size}x${size}.png "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/insomnia.png"
    done
}

neeks commented on 2019-08-09 03:21 (UTC) (edited on 2019-08-13 15:26 (UTC) by neeks)

Is it possible we could make the necessary changes to support detection of electron3-bin and not just electron3? Looks like the sed'ing for electron-buidler would need tweaking to use the output of which electron3.

Would prefer to not have to compile a legacy electron build it needs updating (e.g security-related patches, shared lib updates). The following error message was thrown when electron3-bin is installed:

ENOENT: no such file or directory, scandir '/usr/lib/electron3'

EDIT: Libevent was recently updated and electron3 needs to be recompiled for the updated shared library -- please update to work with electron3-bin. Thanks for the package regardless.

gandriyko commented on 2019-07-29 21:28 (UTC) (edited on 2019-07-29 21:29 (UTC) by gandriyko)

on build:

insomnia-app: Could not detect abi for version 5.0.8 and runtime electron.  Updating "node-abi" might help solve this issue if it is a new release of electron
insomnia-app: Error: Could not detect abi for version 5.0.8 and runtime electron.  Updating "node-abi" might help solve this issue if it is a new release of electron
insomnia-app:     at Object.getAbi (/mnt/data/home/.cache/pikaur/build/insomnia-src/src/insomnia-6.5.4/packages/insomnia-app/node_modules/node-abi/index.js:30:9)
insomnia-app:     at new Rebuilder (/mnt/data/home/.cache/pikaur/build/insomnia-src/src/insomnia-6.5.4/packages/insomnia-app/node_modules/electron-rebuild/lib/src/rebuild.js:122:28)
insomnia-app:     at rebuildWithOptions (/mnt/data/home/.cache/pikaur/build/insomnia-src/src/insomnia-6.5.4/packages/insomnia-app/node_modules/electron-rebuild/lib/src/rebuild.js:393:23)
insomnia-app:     at Object.doRebuild [as rebuild] (/mnt/data/home/.cache/pikaur/build/insomnia-src/src/insomnia-6.5.4/packages/insomnia-app/node_modules/electron-rebuild/lib/src/rebuild.js:400:16)
insomnia-app:     at Object.<anonymous> (/mnt/data/home/.cache/pikaur/build/insomnia-src/src/insomnia-6.5.4/packages/insomnia-app/node_modules/electron-rebuild/lib/src/cli.js:115:33)
insomnia-app:     at Generator.next (<anonymous>)
insomnia-app:     at fulfilled (/mnt/data/home/.cache/pikaur/build/insomnia-src/src/insomnia-6.5.4/packages/insomnia-app/node_modules/electron-rebuild/lib/src/cli.js:5:58)
insomnia-app: npm ERR! code ELIFECYCLE
insomnia-app: npm ERR! errno 255
insomnia-app: npm ERR! insomnia-app@1.1.7 bootstrap: `rimraf node_modules/fsevents && rimraf node_modules/graphql-language-service-interface/dist/*.flow && electron-rebuild -f -w insomnia-libcurl`
insomnia-app: npm ERR! Exit status 255
insomnia-app: npm ERR!