Package Details: insomnia-src 7.0.3-1

Git Clone URL: (read-only, click to copy)
Package Base: insomnia-src
Description: Cross-platform HTTP and GraphQL Client (Build from source)
Upstream URL:
Licenses: MIT
Conflicts: insomnia
Provides: insomnia
Submitter: bruceutut
Maintainer: ccat3z
Last Packager: ccat3z
Votes: 0
Popularity: 0.000000
First Submitted: 2019-05-12 09:18
Last Updated: 2019-10-19 05:16

Dependencies (1)

Required by (0)

Sources (1)

Latest Comments

neeks commented on 2019-08-13 16:59

@ccat3z thanks! I'm so use to scripting for cross-distro environments that it didn't cross my mind that realpath could be used for easier detection

ccat3z commented on 2019-08-13 16:34

@neeks thanks for your help. 6.6.2-2 support both electron3 and electron3-bin.

If you want to install electron3-bin instead of electron3, you can install electron3-bin before building this package.

$ yay -S electron3-bin --asdeps
$ yay -S insomnia-src

neeks commented on 2019-08-13 16:03

PKGBUILD for anyone wanting to use electron3-bin:

# Maintainer: ccat3 <>
# Contributor: bruceutut <>

pkgdesc="Cross-platform HTTP and GraphQL Client (Build from source)"
arch=('x86_64' 'i686')

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

    # Make electron version to match community/electron
    electronV=$(electron3 --version)
    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\": \"\",/\"appId\": \"\",\"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/"
    install -Dm755 "$srcdir/" "$pkgdir/usr/bin/insomnia"

    # Install desktop file
    echo "[Desktop Entry]
Comment=Debug APIs like a human, not a robot
Exec=insomnia %U
" > "$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"

neeks commented on 2019-08-09 03:21

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

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 (<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!