Package Details: insomnia 11.2.0-2

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: plp
Last Packager: plp
Votes: 25
Popularity: 1.58
First Submitted: 2020-10-19 17:29 (UTC)
Last Updated: 2025-06-09 12:46 (UTC)

Latest Comments

« First ‹ Previous 1 .. 3 4 5 6 7 8 9 10 Next › Last »

sardaukar commented on 2020-11-05 13:27 (UTC)

I'll try using the fix in https://github.com/nvm-sh/nvm/issues/303#issuecomment-121086278 for the fish shell

luxcem commented on 2020-11-05 13:24 (UTC)

Thanks @kescherAUR, it seems we still have an issue with fish shell (https://github.com/nvm-sh/nvm/issues/303) but I don't see an alternative right now.

kescherAUR commented on 2020-11-05 13:12 (UTC)

This git diff:

  • Fixes the build issue (for me at least)
  • Restores a user's previously picked node version after build
diff --git a/.SRCINFO b/.SRCINFO
index e27f6a3..d97d765 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
 pkgbase = insomnia
    pkgdesc = Cross-platform HTTP and GraphQL Client
    pkgver = 2020.4.2
-   pkgrel = 3
+   pkgrel = 4
    url = https://github.com/Kong/insomnia
    arch = any
    license = MIT
diff --git a/PKGBUILD b/PKGBUILD
index c6367a1..4563957 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@

 pkgname=insomnia
 pkgver=2020.4.2
-pkgrel=3
+pkgrel=4
 _nodeversion=12.18.3
 pkgdesc="Cross-platform HTTP and GraphQL Client"
 url="https://github.com/Kong/insomnia"
@@ -19,8 +19,7 @@ source=(
 )
 b2sums=('2527045680d99d0321ce9a29f8d3e9302bd07c79d059d0a2e9c3f963d2adb45c9566668faca817a0f4913ee22728ebb8f553463ae6cdc731793520a3371d0953'
         'd2ceeb224fa3a35551b0929648d5e066da93a451a66b73373c13ed0dd89575a2482c2dc8e7499b214d0d62cca2532189dac9a681537751a5a86b592cae5686c7'
-        '7ea4aff2779267bfc5f7be5533d70b07a3da1c8bfed424c9f6cc9806fe6567a4cd40144264a8827b016e51f31c6dbb395c90aac4d333f297070213c77a0b2c9c'
-)
+        '7ea4aff2779267bfc5f7be5533d70b07a3da1c8bfed424c9f6cc9806fe6567a4cd40144264a8827b016e51f31c6dbb395c90aac4d333f297070213c77a0b2c9c')

 prepare() {
   # Use local electron version
@@ -29,14 +28,19 @@ prepare() {
   cd ${pkgname}-core-${pkgver}
   electron_version=$(electron --version | sed s/v//)
   sed -i 's/"electron": ".+"/"electron": "'"$electron_version"'"/g' packages/insomnia-app/package.json
-  source /usr/share/nvm/init-nvm.sh
+  source /usr/share/nvm/init-nvm.sh || [ -n "$NVM_BIN" ]
+  # Backup the nvm version used before
+  nvm current > "/tmp/${pkgname}-nvm-current.tmp"
   nvm install ${_nodeversion}
+  nvm use ${_nodeversion}
 }

 build() {
   cd ${pkgname}-core-${pkgver}
   npm run bootstrap
   GIT_TAG="core@${pkgver}" npm run app-package
+  # Restore the previous node version so as not to interfere with a user's picked node version on each build
+  nvm use "$(cat "/tmp/${pkgname}-nvm-current.tmp")"
 }

 package() {

kescherAUR commented on 2020-11-05 12:44 (UTC) (edited on 2020-11-05 12:44 (UTC) by kescherAUR)

After the PKGBUILD update, it still breaks as soon as nvm-init.sh is sourced.

==> Making package: insomnia 2020.4.2-3 (Do 05 Nov 2020 13:41:44)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found insomnia-2020.4.2.tar.gz
  -> Found insomnia.desktop
  -> Found insomnia.sh
==> Validating source files with b2sums...
    insomnia-2020.4.2.tar.gz ... Passed
    insomnia.desktop ... Passed
    insomnia.sh ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting insomnia-2020.4.2.tar.gz with bsdtar
==> Starting prepare()...
==> ERROR: A failure occurred in prepare().
    Aborting...

If I do the commands in prepare() and build() by hand and just package as before, it works.

dankobgd commented on 2020-11-05 12:43 (UTC)

i get an error during the build

Building insomnia...
==> Making package: insomnia 2020.4.2-3 (Thu Nov  5 13:38:57 2020)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found insomnia-2020.4.2.tar.gz
  -> Found insomnia.desktop
  -> Found insomnia.sh
==> Validating source files with b2sums...
    insomnia-2020.4.2.tar.gz ... Passed
    insomnia.desktop ... Passed
    insomnia.sh ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting insomnia-2020.4.2.tar.gz with bsdtar
bsdtar: Failed to set default locale
==> Starting prepare()...
==> ERROR: A failure occurred in prepare().
    Aborting...

kescherAUR commented on 2020-11-05 09:03 (UTC) (edited on 2020-11-05 09:08 (UTC) by kescherAUR)

Executing every single line in the build() function by hand works... So I can just do makepkg -eR and I'll have a working package. Weird.

kescherAUR commented on 2020-11-05 08:51 (UTC) (edited on 2020-11-05 08:52 (UTC) by kescherAUR)

Since the update for this package to use nvm, the package fails in the build() function. More specifically, it fails at the line

source /usr/share/nvm/init-nvm.sh

even though manually sourcing that works fine. I use bash.

sardaukar commented on 2020-11-05 02:20 (UTC) (edited on 2020-11-05 02:24 (UTC) by sardaukar)

Still getting an error on build() - is there a fix?

Running "source /usr/share/nvm/init-nvm.sh" gives me an error I think because I run the fish shell. If I source it on a bash prompt, it works fine.

/usr/share/nvm/nvm.sh (line 922): Unexpected ')' found, expecting '}'
      "${NVM_NODE_PREFIX}")
                          ^
from sourcing file /usr/share/nvm/nvm.sh
    called on line 4 of file /usr/share/nvm/init-nvm.sh
from sourcing file /usr/share/nvm/init-nvm.sh
source: Error while reading file “/usr/share/nvm/nvm.sh”
/usr/share/nvm/bash_completion (line 35): Unexpected ')' found, expecting '}'
      alias) __nvm_installed_nodes ;;
           ^
from sourcing file /usr/share/nvm/bash_completion
    called on line 5 of file /usr/share/nvm/init-nvm.sh
from sourcing file /usr/share/nvm/init-nvm.sh
source: Error while reading file “/usr/share/nvm/bash_completion”

luxcem commented on 2020-11-04 12:14 (UTC)

It might be but there is no guarantee, the nodejs-lts-fermium version is not officially supported. Also nodejs-lts-fermium conflicts with nodejs and I rather not force people to downgrade nodejs to @v14 just for this package. I think nvm is the "cleanest" solution, but not the most efficient.