Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: insomnia-2020.4.2
@ 2020-11-23 16:56 kedodrill
  2020-12-02 19:05 ` kedodrill
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: kedodrill @ 2020-11-23 16:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

There is a new pull request by kedodrill against master on the void-packages repository

https://github.com/kedodrill/void-packages insomnia
https://github.com/void-linux/void-packages/pull/26647

New package: insomnia-2020.4.2
Closes void-linux/issues#11311
Closes void-linux#23948

The patches that I have made are required because the nodejs build script will first try the `preinstall` script. Since the Void nodejs version is `12.18.4` instead of `12.18.3`, it will fail. I think the minor version bump is not worth dealing with `nvm` or `n` to get that specific version, but I can change this if need be.

`ffmpeg` is required for the executable, but it provides this when creating the package.

I have tested this with the `-Q` option.
This is my first package, I mostly tried to build it around the Rocket-Chat package. Please let me know if anything can be better / needs to be changed :)

I use this package almost every day for work so I will be testing it quite frequently.

A patch file from https://github.com/void-linux/void-packages/pull/26647.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-insomnia-26647.patch --]
[-- Type: text/x-diff, Size: 4844 bytes --]

From c26ae3430235e1482b12c60ee957159520368b53 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Mon, 23 Nov 2020 10:42:54 -0600
Subject: [PATCH] New package: insomnia-2020.4.2

* Add all files and patches
---
 srcpkgs/insomnia/files/insomnia               |  2 ++
 srcpkgs/insomnia/files/insomnia.desktop       | 11 ++++++++
 .../patches/remove-nodejs-version-check.patch | 14 ++++++++++
 .../patches/remove-preinstall-step.patch      | 10 +++++++
 srcpkgs/insomnia/template                     | 28 +++++++++++++++++++
 5 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/insomnia/files/insomnia
 create mode 100644 srcpkgs/insomnia/files/insomnia.desktop
 create mode 100644 srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
 create mode 100644 srcpkgs/insomnia/patches/remove-preinstall-step.patch
 create mode 100644 srcpkgs/insomnia/template

diff --git a/srcpkgs/insomnia/files/insomnia b/srcpkgs/insomnia/files/insomnia
new file mode 100644
index 00000000000..d9f0e988b9c
--- /dev/null
+++ b/srcpkgs/insomnia/files/insomnia
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec electron9 /usr/lib/insomnia.asar "$@"
\ No newline at end of file
diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
new file mode 100644
index 00000000000..73b9540c78e
--- /dev/null
+++ b/srcpkgs/insomnia/files/insomnia.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Insomnia
+Comment=Design and debug APIs like a human, not a robot.
+GenericName=The Desktop API client for REST and GraphQL
+Exec=/usr/bin/insomnia
+Icon=insomnia
+Type=Application
+StartupNotify=false
+StartupWMClass=Insomnia
+Categories=Utility;Development;
+Keywords=rest;graphql;request;
\ No newline at end of file
diff --git a/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
new file mode 100644
index 00000000000..7df2dabba07
--- /dev/null
+++ b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
@@ -0,0 +1,14 @@
+--- packages/insomnia-app/scripts/build.js	2020-10-21 06:53:51.000000000 -0500
++++ packages/insomnia-app/scripts/build.js	2020-11-22 23:28:58.338186804 -0600
+@@ -56,11 +56,6 @@
+   console.log(`[build] npm: ${childProcess.spawnSync('npm', ['--version']).stdout}`.trim());
+   console.log(`[build] node: ${childProcess.spawnSync('node', ['--version']).stdout}`.trim());
+ 
+-  if (process.version.indexOf('v12.') !== 0) {
+-    console.log('[build] Node v12.x.x is required to build');
+-    process.exit(1);
+-  }
+-
+   // Remove folders first
+   console.log('[build] Removing existing directories');
+   await emptyDir(buildFolder);
diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
new file mode 100644
index 00000000000..232bf31cc8a
--- /dev/null
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -0,0 +1,10 @@
+--- package.json	2020-10-21 06:53:51.000000000 -0500
++++ package.json	2020-11-23 00:21:57.194334606 -0600
+@@ -24,7 +24,6 @@
+     "app-release": "npm run release --prefix packages/insomnia-app",
+     "storybook-start": "npm run storybook --prefix packages/insomnia-components",
+     "storybook-legacy-start": "npm run storybook --prefix packages/insomnia-app",
+-    "preinstall": "node ./scripts/check-version.js",
+     "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
+     "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
+     "test:smoke:core": "npm run test:core:build --prefix packages/insomnia-smoke-test",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
new file mode 100644
index 00000000000..d0af8d3fc1c
--- /dev/null
+++ b/srcpkgs/insomnia/template
@@ -0,0 +1,28 @@
+# Template file for 'insomnia'
+pkgname=insomnia
+version=2020.4.2
+revision=1
+archs="x86_64"
+wrksrc="insomnia-core-${version}"
+hostmakedepends="git nodejs-lts curl tar"
+makedepends="electron9 python3 libcurl-devel make fontconfig-devel"
+depends="electron9 ffmpeg"
+short_desc="Desktop API client for REST and GraphQL"
+maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
+license="MIT"
+homepage="https://insomnia.rest"
+distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
+checksum=0b40fc4b347b5142e7a09a6488578ea3e30d050a3efc1146d6f1e0c7aed1de0d
+
+do_build() {
+	npm run bootstrap
+	GIT_TAG="core@${version}" npm run app-package
+}
+
+do_install() {
+	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
+	vbin "$FILESDIR/insomnia"
+	vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_512.png 644 usr/share/icons/hicolor/512x512/apps insomnia.png
+	vlicense LICENSE
+	vinstall "packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/resources/app.asar" 644 /usr/lib insomnia.asar
+}

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New package: insomnia-2020.4.2
  2020-11-23 16:56 [PR PATCH] New package: insomnia-2020.4.2 kedodrill
@ 2020-12-02 19:05 ` kedodrill
  2020-12-03 16:09 ` kedodrill
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: kedodrill @ 2020-12-02 19:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 272 bytes --]

New comment by kedodrill on void-packages repository

https://github.com/void-linux/void-packages/pull/26647#issuecomment-737433736

Comment:
I have the files updated for 2020.5.0, but waiting until I hear back on this issue:
https://github.com/Kong/insomnia/issues/2892

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New package: insomnia-2020.4.2
  2020-11-23 16:56 [PR PATCH] New package: insomnia-2020.4.2 kedodrill
  2020-12-02 19:05 ` kedodrill
@ 2020-12-03 16:09 ` kedodrill
  2020-12-03 20:29 ` [PR PATCH] [Updated] " kedodrill
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: kedodrill @ 2020-12-03 16:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

New comment by kedodrill on void-packages repository

https://github.com/void-linux/void-packages/pull/26647#issuecomment-737433736

Comment:
I have the files updated for 2020.5.0, but waiting until I hear back on this issue:
https://github.com/Kong/insomnia/issues/2892

Updating soon, testing 5.0 for a bit.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Updated] New package: insomnia-2020.4.2
  2020-11-23 16:56 [PR PATCH] New package: insomnia-2020.4.2 kedodrill
  2020-12-02 19:05 ` kedodrill
  2020-12-03 16:09 ` kedodrill
@ 2020-12-03 20:29 ` kedodrill
  2020-12-03 20:31 ` kedodrill
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: kedodrill @ 2020-12-03 20:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1075 bytes --]

There is an updated pull request by kedodrill against master on the void-packages repository

https://github.com/kedodrill/void-packages insomnia
https://github.com/void-linux/void-packages/pull/26647

New package: insomnia-2020.4.2
Closes #11311
Closes void-linux#23948

The patches that I have made are required because the nodejs build script will first try the `preinstall` script. Since the Void nodejs version is `12.18.4` instead of `12.18.3`, it will fail. I think the minor version bump is not worth dealing with `nvm` or `n` to get that specific version, but I can change this if need be.

`ffmpeg` is required for the executable, but it provides this when creating the package.

I have tested this with the `-Q` option.
This is my first package, I mostly tried to build it around the Rocket-Chat package. Please let me know if anything can be better / needs to be changed :)

I use this package almost every day for work so I will be testing it quite frequently.

A patch file from https://github.com/void-linux/void-packages/pull/26647.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-insomnia-26647.patch --]
[-- Type: text/x-diff, Size: 9390 bytes --]

From cce9bca643acc40b8b43f42f535ccb966da3edf0 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Mon, 23 Nov 2020 10:42:54 -0600
Subject: [PATCH 1/2] Ref void-linux/issues#11311

* Add all files and patches
---
 srcpkgs/insomnia/files/insomnia               |  2 ++
 srcpkgs/insomnia/files/insomnia.desktop       | 11 ++++++++
 .../patches/remove-nodejs-version-check.patch | 14 ++++++++++
 .../patches/remove-preinstall-step.patch      | 10 +++++++
 srcpkgs/insomnia/template                     | 28 +++++++++++++++++++
 5 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/insomnia/files/insomnia
 create mode 100644 srcpkgs/insomnia/files/insomnia.desktop
 create mode 100644 srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
 create mode 100644 srcpkgs/insomnia/patches/remove-preinstall-step.patch
 create mode 100644 srcpkgs/insomnia/template

diff --git a/srcpkgs/insomnia/files/insomnia b/srcpkgs/insomnia/files/insomnia
new file mode 100644
index 00000000000..d9f0e988b9c
--- /dev/null
+++ b/srcpkgs/insomnia/files/insomnia
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec electron9 /usr/lib/insomnia.asar "$@"
\ No newline at end of file
diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
new file mode 100644
index 00000000000..73b9540c78e
--- /dev/null
+++ b/srcpkgs/insomnia/files/insomnia.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Insomnia
+Comment=Design and debug APIs like a human, not a robot.
+GenericName=The Desktop API client for REST and GraphQL
+Exec=/usr/bin/insomnia
+Icon=insomnia
+Type=Application
+StartupNotify=false
+StartupWMClass=Insomnia
+Categories=Utility;Development;
+Keywords=rest;graphql;request;
\ No newline at end of file
diff --git a/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
new file mode 100644
index 00000000000..7df2dabba07
--- /dev/null
+++ b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
@@ -0,0 +1,14 @@
+--- packages/insomnia-app/scripts/build.js	2020-10-21 06:53:51.000000000 -0500
++++ packages/insomnia-app/scripts/build.js	2020-11-22 23:28:58.338186804 -0600
+@@ -56,11 +56,6 @@
+   console.log(`[build] npm: ${childProcess.spawnSync('npm', ['--version']).stdout}`.trim());
+   console.log(`[build] node: ${childProcess.spawnSync('node', ['--version']).stdout}`.trim());
+ 
+-  if (process.version.indexOf('v12.') !== 0) {
+-    console.log('[build] Node v12.x.x is required to build');
+-    process.exit(1);
+-  }
+-
+   // Remove folders first
+   console.log('[build] Removing existing directories');
+   await emptyDir(buildFolder);
diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
new file mode 100644
index 00000000000..232bf31cc8a
--- /dev/null
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -0,0 +1,10 @@
+--- package.json	2020-10-21 06:53:51.000000000 -0500
++++ package.json	2020-11-23 00:21:57.194334606 -0600
+@@ -24,7 +24,6 @@
+     "app-release": "npm run release --prefix packages/insomnia-app",
+     "storybook-start": "npm run storybook --prefix packages/insomnia-components",
+     "storybook-legacy-start": "npm run storybook --prefix packages/insomnia-app",
+-    "preinstall": "node ./scripts/check-version.js",
+     "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
+     "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
+     "test:smoke:core": "npm run test:core:build --prefix packages/insomnia-smoke-test",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
new file mode 100644
index 00000000000..d0af8d3fc1c
--- /dev/null
+++ b/srcpkgs/insomnia/template
@@ -0,0 +1,28 @@
+# Template file for 'insomnia'
+pkgname=insomnia
+version=2020.4.2
+revision=1
+archs="x86_64"
+wrksrc="insomnia-core-${version}"
+hostmakedepends="git nodejs-lts curl tar"
+makedepends="electron9 python3 libcurl-devel make fontconfig-devel"
+depends="electron9 ffmpeg"
+short_desc="Desktop API client for REST and GraphQL"
+maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
+license="MIT"
+homepage="https://insomnia.rest"
+distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
+checksum=0b40fc4b347b5142e7a09a6488578ea3e30d050a3efc1146d6f1e0c7aed1de0d
+
+do_build() {
+	npm run bootstrap
+	GIT_TAG="core@${version}" npm run app-package
+}
+
+do_install() {
+	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
+	vbin "$FILESDIR/insomnia"
+	vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_512.png 644 usr/share/icons/hicolor/512x512/apps insomnia.png
+	vlicense LICENSE
+	vinstall "packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/resources/app.asar" 644 /usr/lib insomnia.asar
+}

From 258f6adc6488a91d4a63c1a2ad1f3929312444b2 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Thu, 3 Dec 2020 14:27:54 -0600
Subject: [PATCH 2/2] Update to 5.0 and switch template to different build
 style

* Using template more similar to Signal-Desktop now
---
 srcpkgs/insomnia/files/insomnia               |  2 --
 srcpkgs/insomnia/files/insomnia.desktop       |  2 +-
 .../patches/remove-preinstall-step.patch      |  6 ++--
 srcpkgs/insomnia/template                     | 33 ++++++++++++++-----
 4 files changed, 29 insertions(+), 14 deletions(-)
 delete mode 100644 srcpkgs/insomnia/files/insomnia

diff --git a/srcpkgs/insomnia/files/insomnia b/srcpkgs/insomnia/files/insomnia
deleted file mode 100644
index d9f0e988b9c..00000000000
--- a/srcpkgs/insomnia/files/insomnia
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec electron9 /usr/lib/insomnia.asar "$@"
\ No newline at end of file
diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
index 73b9540c78e..1081093ed04 100644
--- a/srcpkgs/insomnia/files/insomnia.desktop
+++ b/srcpkgs/insomnia/files/insomnia.desktop
@@ -2,7 +2,7 @@
 Name=Insomnia
 Comment=Design and debug APIs like a human, not a robot.
 GenericName=The Desktop API client for REST and GraphQL
-Exec=/usr/bin/insomnia
+Exec=insomnia
 Icon=insomnia
 Type=Application
 StartupNotify=false
diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
index 232bf31cc8a..7db2858f12b 100644
--- a/srcpkgs/insomnia/patches/remove-preinstall-step.patch
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -1,5 +1,5 @@
---- package.json	2020-10-21 06:53:51.000000000 -0500
-+++ package.json	2020-11-23 00:21:57.194334606 -0600
+--- package.json	2020-12-02 09:40:05.169126515 -0600
++++ package.json	2020-12-02 09:40:51.452756863 -0600
 @@ -24,7 +24,6 @@
      "app-release": "npm run release --prefix packages/insomnia-app",
      "storybook-start": "npm run storybook --prefix packages/insomnia-components",
@@ -7,4 +7,4 @@
 -    "preinstall": "node ./scripts/check-version.js",
      "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
      "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
-     "test:smoke:core": "npm run test:core:build --prefix packages/insomnia-smoke-test",
+     "app-package:smoke:core": "cross-env SMOKE_TEST=core npm run app-package",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index d0af8d3fc1c..f357bd3b0bb 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -1,28 +1,45 @@
 # Template file for 'insomnia'
 pkgname=insomnia
-version=2020.4.2
+version=2020.5.0
 revision=1
 archs="x86_64"
 wrksrc="insomnia-core-${version}"
 hostmakedepends="git nodejs-lts curl tar"
-makedepends="electron9 python3 libcurl-devel make fontconfig-devel"
-depends="electron9 ffmpeg"
+makedepends="python3 libcurl-devel make fontconfig-devel"
+depends="ffmpeg"
 short_desc="Desktop API client for REST and GraphQL"
 maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
 license="MIT"
 homepage="https://insomnia.rest"
 distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
-checksum=0b40fc4b347b5142e7a09a6488578ea3e30d050a3efc1146d6f1e0c7aed1de0d
+checksum=743360f5798f8e94c785b778644eaf47bff4c9c9bb0c5ca03969267cea6074c0
+nostrip_files="insomnia"
 
-do_build() {
+pre_build() {
 	npm run bootstrap
+	npm run test
+}
+
+do_build() {
 	GIT_TAG="core@${version}" npm run app-package
 }
 
 do_install() {
+	vmkdir usr/lib/insomnia
+	vcopy packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/* usr/lib/insomnia
+
+    vmkdir usr/bin
+    ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
+    
 	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
-	vbin "$FILESDIR/insomnia"
-	vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_512.png 644 usr/share/icons/hicolor/512x512/apps insomnia.png
+
+	for size in 16 32 48 128; do
+		vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_${size}x${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
+	done
+
+	for size in 256 512; do
+		vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
+	done
+
 	vlicense LICENSE
-	vinstall "packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/resources/app.asar" 644 /usr/lib insomnia.asar
 }

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New package: insomnia-2020.4.2
  2020-11-23 16:56 [PR PATCH] New package: insomnia-2020.4.2 kedodrill
                   ` (2 preceding siblings ...)
  2020-12-03 20:29 ` [PR PATCH] [Updated] " kedodrill
@ 2020-12-03 20:31 ` kedodrill
  2020-12-03 20:32 ` [PR PATCH] [Updated] " kedodrill
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: kedodrill @ 2020-12-03 20:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 449 bytes --]

New comment by kedodrill on void-packages repository

https://github.com/void-linux/void-packages/pull/26647#issuecomment-737433736

Comment:
I have the files updated for 2020.5.0, but waiting until I hear back on this issue:
https://github.com/Kong/insomnia/issues/2892

Updating soon, testing 5.0 for a bit.

I have updated this for 2020.5.0. I included running the tests and changed the template style to something more like Signal-Desktop.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Updated] New package: insomnia-2020.4.2
  2020-11-23 16:56 [PR PATCH] New package: insomnia-2020.4.2 kedodrill
                   ` (3 preceding siblings ...)
  2020-12-03 20:31 ` kedodrill
@ 2020-12-03 20:32 ` kedodrill
  2020-12-03 21:51 ` kedodrill
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: kedodrill @ 2020-12-03 20:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]

There is an updated pull request by kedodrill against master on the void-packages repository

https://github.com/kedodrill/void-packages insomnia
https://github.com/void-linux/void-packages/pull/26647

New package: insomnia-2020.4.2
Closes #11311
Closes void-linux#23948

The patches that I have made are required because the nodejs build script will first try the `preinstall` script. Since the Void nodejs version is `12.18.4` instead of `12.18.3`, it will fail. I think the minor version bump is not worth dealing with `nvm` or `n` to get that specific version, but I can change this if need be.

`ffmpeg` is required for the executable, but it provides this when creating the package.

I have tested this with the `-Q` option.
This is my first package, I mostly tried to build it around the Signal-Desktop package. Please let me know if anything can be better / needs to be changed :)

I have been using this package quite frequently for work and it has been working great.

A patch file from https://github.com/void-linux/void-packages/pull/26647.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-insomnia-26647.patch --]
[-- Type: text/x-diff, Size: 10278 bytes --]

From cce9bca643acc40b8b43f42f535ccb966da3edf0 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Mon, 23 Nov 2020 10:42:54 -0600
Subject: [PATCH 1/3] Ref void-linux/issues#11311

* Add all files and patches
---
 srcpkgs/insomnia/files/insomnia               |  2 ++
 srcpkgs/insomnia/files/insomnia.desktop       | 11 ++++++++
 .../patches/remove-nodejs-version-check.patch | 14 ++++++++++
 .../patches/remove-preinstall-step.patch      | 10 +++++++
 srcpkgs/insomnia/template                     | 28 +++++++++++++++++++
 5 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/insomnia/files/insomnia
 create mode 100644 srcpkgs/insomnia/files/insomnia.desktop
 create mode 100644 srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
 create mode 100644 srcpkgs/insomnia/patches/remove-preinstall-step.patch
 create mode 100644 srcpkgs/insomnia/template

diff --git a/srcpkgs/insomnia/files/insomnia b/srcpkgs/insomnia/files/insomnia
new file mode 100644
index 00000000000..d9f0e988b9c
--- /dev/null
+++ b/srcpkgs/insomnia/files/insomnia
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec electron9 /usr/lib/insomnia.asar "$@"
\ No newline at end of file
diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
new file mode 100644
index 00000000000..73b9540c78e
--- /dev/null
+++ b/srcpkgs/insomnia/files/insomnia.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Insomnia
+Comment=Design and debug APIs like a human, not a robot.
+GenericName=The Desktop API client for REST and GraphQL
+Exec=/usr/bin/insomnia
+Icon=insomnia
+Type=Application
+StartupNotify=false
+StartupWMClass=Insomnia
+Categories=Utility;Development;
+Keywords=rest;graphql;request;
\ No newline at end of file
diff --git a/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
new file mode 100644
index 00000000000..7df2dabba07
--- /dev/null
+++ b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
@@ -0,0 +1,14 @@
+--- packages/insomnia-app/scripts/build.js	2020-10-21 06:53:51.000000000 -0500
++++ packages/insomnia-app/scripts/build.js	2020-11-22 23:28:58.338186804 -0600
+@@ -56,11 +56,6 @@
+   console.log(`[build] npm: ${childProcess.spawnSync('npm', ['--version']).stdout}`.trim());
+   console.log(`[build] node: ${childProcess.spawnSync('node', ['--version']).stdout}`.trim());
+ 
+-  if (process.version.indexOf('v12.') !== 0) {
+-    console.log('[build] Node v12.x.x is required to build');
+-    process.exit(1);
+-  }
+-
+   // Remove folders first
+   console.log('[build] Removing existing directories');
+   await emptyDir(buildFolder);
diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
new file mode 100644
index 00000000000..232bf31cc8a
--- /dev/null
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -0,0 +1,10 @@
+--- package.json	2020-10-21 06:53:51.000000000 -0500
++++ package.json	2020-11-23 00:21:57.194334606 -0600
+@@ -24,7 +24,6 @@
+     "app-release": "npm run release --prefix packages/insomnia-app",
+     "storybook-start": "npm run storybook --prefix packages/insomnia-components",
+     "storybook-legacy-start": "npm run storybook --prefix packages/insomnia-app",
+-    "preinstall": "node ./scripts/check-version.js",
+     "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
+     "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
+     "test:smoke:core": "npm run test:core:build --prefix packages/insomnia-smoke-test",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
new file mode 100644
index 00000000000..d0af8d3fc1c
--- /dev/null
+++ b/srcpkgs/insomnia/template
@@ -0,0 +1,28 @@
+# Template file for 'insomnia'
+pkgname=insomnia
+version=2020.4.2
+revision=1
+archs="x86_64"
+wrksrc="insomnia-core-${version}"
+hostmakedepends="git nodejs-lts curl tar"
+makedepends="electron9 python3 libcurl-devel make fontconfig-devel"
+depends="electron9 ffmpeg"
+short_desc="Desktop API client for REST and GraphQL"
+maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
+license="MIT"
+homepage="https://insomnia.rest"
+distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
+checksum=0b40fc4b347b5142e7a09a6488578ea3e30d050a3efc1146d6f1e0c7aed1de0d
+
+do_build() {
+	npm run bootstrap
+	GIT_TAG="core@${version}" npm run app-package
+}
+
+do_install() {
+	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
+	vbin "$FILESDIR/insomnia"
+	vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_512.png 644 usr/share/icons/hicolor/512x512/apps insomnia.png
+	vlicense LICENSE
+	vinstall "packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/resources/app.asar" 644 /usr/lib insomnia.asar
+}

From 258f6adc6488a91d4a63c1a2ad1f3929312444b2 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Thu, 3 Dec 2020 14:27:54 -0600
Subject: [PATCH 2/3] Update to 5.0 and switch template to different build
 style

* Using template more similar to Signal-Desktop now
---
 srcpkgs/insomnia/files/insomnia               |  2 --
 srcpkgs/insomnia/files/insomnia.desktop       |  2 +-
 .../patches/remove-preinstall-step.patch      |  6 ++--
 srcpkgs/insomnia/template                     | 33 ++++++++++++++-----
 4 files changed, 29 insertions(+), 14 deletions(-)
 delete mode 100644 srcpkgs/insomnia/files/insomnia

diff --git a/srcpkgs/insomnia/files/insomnia b/srcpkgs/insomnia/files/insomnia
deleted file mode 100644
index d9f0e988b9c..00000000000
--- a/srcpkgs/insomnia/files/insomnia
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec electron9 /usr/lib/insomnia.asar "$@"
\ No newline at end of file
diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
index 73b9540c78e..1081093ed04 100644
--- a/srcpkgs/insomnia/files/insomnia.desktop
+++ b/srcpkgs/insomnia/files/insomnia.desktop
@@ -2,7 +2,7 @@
 Name=Insomnia
 Comment=Design and debug APIs like a human, not a robot.
 GenericName=The Desktop API client for REST and GraphQL
-Exec=/usr/bin/insomnia
+Exec=insomnia
 Icon=insomnia
 Type=Application
 StartupNotify=false
diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
index 232bf31cc8a..7db2858f12b 100644
--- a/srcpkgs/insomnia/patches/remove-preinstall-step.patch
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -1,5 +1,5 @@
---- package.json	2020-10-21 06:53:51.000000000 -0500
-+++ package.json	2020-11-23 00:21:57.194334606 -0600
+--- package.json	2020-12-02 09:40:05.169126515 -0600
++++ package.json	2020-12-02 09:40:51.452756863 -0600
 @@ -24,7 +24,6 @@
      "app-release": "npm run release --prefix packages/insomnia-app",
      "storybook-start": "npm run storybook --prefix packages/insomnia-components",
@@ -7,4 +7,4 @@
 -    "preinstall": "node ./scripts/check-version.js",
      "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
      "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
-     "test:smoke:core": "npm run test:core:build --prefix packages/insomnia-smoke-test",
+     "app-package:smoke:core": "cross-env SMOKE_TEST=core npm run app-package",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index d0af8d3fc1c..f357bd3b0bb 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -1,28 +1,45 @@
 # Template file for 'insomnia'
 pkgname=insomnia
-version=2020.4.2
+version=2020.5.0
 revision=1
 archs="x86_64"
 wrksrc="insomnia-core-${version}"
 hostmakedepends="git nodejs-lts curl tar"
-makedepends="electron9 python3 libcurl-devel make fontconfig-devel"
-depends="electron9 ffmpeg"
+makedepends="python3 libcurl-devel make fontconfig-devel"
+depends="ffmpeg"
 short_desc="Desktop API client for REST and GraphQL"
 maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
 license="MIT"
 homepage="https://insomnia.rest"
 distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
-checksum=0b40fc4b347b5142e7a09a6488578ea3e30d050a3efc1146d6f1e0c7aed1de0d
+checksum=743360f5798f8e94c785b778644eaf47bff4c9c9bb0c5ca03969267cea6074c0
+nostrip_files="insomnia"
 
-do_build() {
+pre_build() {
 	npm run bootstrap
+	npm run test
+}
+
+do_build() {
 	GIT_TAG="core@${version}" npm run app-package
 }
 
 do_install() {
+	vmkdir usr/lib/insomnia
+	vcopy packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/* usr/lib/insomnia
+
+    vmkdir usr/bin
+    ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
+    
 	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
-	vbin "$FILESDIR/insomnia"
-	vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_512.png 644 usr/share/icons/hicolor/512x512/apps insomnia.png
+
+	for size in 16 32 48 128; do
+		vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_${size}x${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
+	done
+
+	for size in 256 512; do
+		vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
+	done
+
 	vlicense LICENSE
-	vinstall "packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/resources/app.asar" 644 /usr/lib insomnia.asar
 }

From 5d530b3c494b9bcc55be434bfa1f9efaeffcd978 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Thu, 3 Dec 2020 14:32:31 -0600
Subject: [PATCH 3/3] Fix template file - lint not successful

---
 srcpkgs/insomnia/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index f357bd3b0bb..e82b1e2fa36 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -28,9 +28,9 @@ do_install() {
 	vmkdir usr/lib/insomnia
 	vcopy packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/* usr/lib/insomnia
 
-    vmkdir usr/bin
-    ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
-    
+	vmkdir usr/bin
+	ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
+
 	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
 
 	for size in 16 32 48 128; do

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New package: insomnia-2020.4.2
  2020-11-23 16:56 [PR PATCH] New package: insomnia-2020.4.2 kedodrill
                   ` (4 preceding siblings ...)
  2020-12-03 20:32 ` [PR PATCH] [Updated] " kedodrill
@ 2020-12-03 21:51 ` kedodrill
  2020-12-05  1:24 ` [PR PATCH] [Updated] New package: insomnia-2020.5.0 kedodrill
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: kedodrill @ 2020-12-03 21:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 275 bytes --]

New comment by kedodrill on void-packages repository

https://github.com/void-linux/void-packages/pull/26647#issuecomment-737433736

Comment:
I have updated this for 2020.5.0. I included running the tests and changed the template style to something more like Signal-Desktop.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Updated] New package: insomnia-2020.5.0
  2020-11-23 16:56 [PR PATCH] New package: insomnia-2020.4.2 kedodrill
                   ` (5 preceding siblings ...)
  2020-12-03 21:51 ` kedodrill
@ 2020-12-05  1:24 ` kedodrill
  2020-12-11  0:13 ` [PR PATCH] [Updated] New package: insomnia-2020.5.1 kedodrill
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: kedodrill @ 2020-12-05  1:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]

There is an updated pull request by kedodrill against master on the void-packages repository

https://github.com/kedodrill/void-packages insomnia
https://github.com/void-linux/void-packages/pull/26647

New package: insomnia-2020.5.0
Closes #11311
Closes void-linux#23948

The patches that I have made are required because the nodejs build script will first try the `preinstall` script. Since the Void nodejs version is `12.18.4` instead of `12.18.3`, it will fail. I think the minor version bump is not worth dealing with `nvm` or `n` to get that specific version, but I can change this if need be.

`ffmpeg` is required for the executable, but it provides this when creating the package.

I have tested this with the `-Q` option.
This is my first package, I mostly tried to build it around the Signal-Desktop package. Please let me know if anything can be better / needs to be changed :)

I have been using this package quite frequently for work and it has been working great.

A patch file from https://github.com/void-linux/void-packages/pull/26647.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-insomnia-26647.patch --]
[-- Type: text/x-diff, Size: 11294 bytes --]

From cce9bca643acc40b8b43f42f535ccb966da3edf0 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Mon, 23 Nov 2020 10:42:54 -0600
Subject: [PATCH 1/4] Ref void-linux/issues#11311

* Add all files and patches
---
 srcpkgs/insomnia/files/insomnia               |  2 ++
 srcpkgs/insomnia/files/insomnia.desktop       | 11 ++++++++
 .../patches/remove-nodejs-version-check.patch | 14 ++++++++++
 .../patches/remove-preinstall-step.patch      | 10 +++++++
 srcpkgs/insomnia/template                     | 28 +++++++++++++++++++
 5 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/insomnia/files/insomnia
 create mode 100644 srcpkgs/insomnia/files/insomnia.desktop
 create mode 100644 srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
 create mode 100644 srcpkgs/insomnia/patches/remove-preinstall-step.patch
 create mode 100644 srcpkgs/insomnia/template

diff --git a/srcpkgs/insomnia/files/insomnia b/srcpkgs/insomnia/files/insomnia
new file mode 100644
index 00000000000..d9f0e988b9c
--- /dev/null
+++ b/srcpkgs/insomnia/files/insomnia
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec electron9 /usr/lib/insomnia.asar "$@"
\ No newline at end of file
diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
new file mode 100644
index 00000000000..73b9540c78e
--- /dev/null
+++ b/srcpkgs/insomnia/files/insomnia.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Insomnia
+Comment=Design and debug APIs like a human, not a robot.
+GenericName=The Desktop API client for REST and GraphQL
+Exec=/usr/bin/insomnia
+Icon=insomnia
+Type=Application
+StartupNotify=false
+StartupWMClass=Insomnia
+Categories=Utility;Development;
+Keywords=rest;graphql;request;
\ No newline at end of file
diff --git a/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
new file mode 100644
index 00000000000..7df2dabba07
--- /dev/null
+++ b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
@@ -0,0 +1,14 @@
+--- packages/insomnia-app/scripts/build.js	2020-10-21 06:53:51.000000000 -0500
++++ packages/insomnia-app/scripts/build.js	2020-11-22 23:28:58.338186804 -0600
+@@ -56,11 +56,6 @@
+   console.log(`[build] npm: ${childProcess.spawnSync('npm', ['--version']).stdout}`.trim());
+   console.log(`[build] node: ${childProcess.spawnSync('node', ['--version']).stdout}`.trim());
+ 
+-  if (process.version.indexOf('v12.') !== 0) {
+-    console.log('[build] Node v12.x.x is required to build');
+-    process.exit(1);
+-  }
+-
+   // Remove folders first
+   console.log('[build] Removing existing directories');
+   await emptyDir(buildFolder);
diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
new file mode 100644
index 00000000000..232bf31cc8a
--- /dev/null
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -0,0 +1,10 @@
+--- package.json	2020-10-21 06:53:51.000000000 -0500
++++ package.json	2020-11-23 00:21:57.194334606 -0600
+@@ -24,7 +24,6 @@
+     "app-release": "npm run release --prefix packages/insomnia-app",
+     "storybook-start": "npm run storybook --prefix packages/insomnia-components",
+     "storybook-legacy-start": "npm run storybook --prefix packages/insomnia-app",
+-    "preinstall": "node ./scripts/check-version.js",
+     "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
+     "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
+     "test:smoke:core": "npm run test:core:build --prefix packages/insomnia-smoke-test",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
new file mode 100644
index 00000000000..d0af8d3fc1c
--- /dev/null
+++ b/srcpkgs/insomnia/template
@@ -0,0 +1,28 @@
+# Template file for 'insomnia'
+pkgname=insomnia
+version=2020.4.2
+revision=1
+archs="x86_64"
+wrksrc="insomnia-core-${version}"
+hostmakedepends="git nodejs-lts curl tar"
+makedepends="electron9 python3 libcurl-devel make fontconfig-devel"
+depends="electron9 ffmpeg"
+short_desc="Desktop API client for REST and GraphQL"
+maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
+license="MIT"
+homepage="https://insomnia.rest"
+distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
+checksum=0b40fc4b347b5142e7a09a6488578ea3e30d050a3efc1146d6f1e0c7aed1de0d
+
+do_build() {
+	npm run bootstrap
+	GIT_TAG="core@${version}" npm run app-package
+}
+
+do_install() {
+	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
+	vbin "$FILESDIR/insomnia"
+	vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_512.png 644 usr/share/icons/hicolor/512x512/apps insomnia.png
+	vlicense LICENSE
+	vinstall "packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/resources/app.asar" 644 /usr/lib insomnia.asar
+}

From 258f6adc6488a91d4a63c1a2ad1f3929312444b2 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Thu, 3 Dec 2020 14:27:54 -0600
Subject: [PATCH 2/4] Update to 5.0 and switch template to different build
 style

* Using template more similar to Signal-Desktop now
---
 srcpkgs/insomnia/files/insomnia               |  2 --
 srcpkgs/insomnia/files/insomnia.desktop       |  2 +-
 .../patches/remove-preinstall-step.patch      |  6 ++--
 srcpkgs/insomnia/template                     | 33 ++++++++++++++-----
 4 files changed, 29 insertions(+), 14 deletions(-)
 delete mode 100644 srcpkgs/insomnia/files/insomnia

diff --git a/srcpkgs/insomnia/files/insomnia b/srcpkgs/insomnia/files/insomnia
deleted file mode 100644
index d9f0e988b9c..00000000000
--- a/srcpkgs/insomnia/files/insomnia
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec electron9 /usr/lib/insomnia.asar "$@"
\ No newline at end of file
diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
index 73b9540c78e..1081093ed04 100644
--- a/srcpkgs/insomnia/files/insomnia.desktop
+++ b/srcpkgs/insomnia/files/insomnia.desktop
@@ -2,7 +2,7 @@
 Name=Insomnia
 Comment=Design and debug APIs like a human, not a robot.
 GenericName=The Desktop API client for REST and GraphQL
-Exec=/usr/bin/insomnia
+Exec=insomnia
 Icon=insomnia
 Type=Application
 StartupNotify=false
diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
index 232bf31cc8a..7db2858f12b 100644
--- a/srcpkgs/insomnia/patches/remove-preinstall-step.patch
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -1,5 +1,5 @@
---- package.json	2020-10-21 06:53:51.000000000 -0500
-+++ package.json	2020-11-23 00:21:57.194334606 -0600
+--- package.json	2020-12-02 09:40:05.169126515 -0600
++++ package.json	2020-12-02 09:40:51.452756863 -0600
 @@ -24,7 +24,6 @@
      "app-release": "npm run release --prefix packages/insomnia-app",
      "storybook-start": "npm run storybook --prefix packages/insomnia-components",
@@ -7,4 +7,4 @@
 -    "preinstall": "node ./scripts/check-version.js",
      "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
      "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
-     "test:smoke:core": "npm run test:core:build --prefix packages/insomnia-smoke-test",
+     "app-package:smoke:core": "cross-env SMOKE_TEST=core npm run app-package",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index d0af8d3fc1c..f357bd3b0bb 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -1,28 +1,45 @@
 # Template file for 'insomnia'
 pkgname=insomnia
-version=2020.4.2
+version=2020.5.0
 revision=1
 archs="x86_64"
 wrksrc="insomnia-core-${version}"
 hostmakedepends="git nodejs-lts curl tar"
-makedepends="electron9 python3 libcurl-devel make fontconfig-devel"
-depends="electron9 ffmpeg"
+makedepends="python3 libcurl-devel make fontconfig-devel"
+depends="ffmpeg"
 short_desc="Desktop API client for REST and GraphQL"
 maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
 license="MIT"
 homepage="https://insomnia.rest"
 distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
-checksum=0b40fc4b347b5142e7a09a6488578ea3e30d050a3efc1146d6f1e0c7aed1de0d
+checksum=743360f5798f8e94c785b778644eaf47bff4c9c9bb0c5ca03969267cea6074c0
+nostrip_files="insomnia"
 
-do_build() {
+pre_build() {
 	npm run bootstrap
+	npm run test
+}
+
+do_build() {
 	GIT_TAG="core@${version}" npm run app-package
 }
 
 do_install() {
+	vmkdir usr/lib/insomnia
+	vcopy packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/* usr/lib/insomnia
+
+    vmkdir usr/bin
+    ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
+    
 	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
-	vbin "$FILESDIR/insomnia"
-	vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_512.png 644 usr/share/icons/hicolor/512x512/apps insomnia.png
+
+	for size in 16 32 48 128; do
+		vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_${size}x${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
+	done
+
+	for size in 256 512; do
+		vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
+	done
+
 	vlicense LICENSE
-	vinstall "packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/resources/app.asar" 644 /usr/lib insomnia.asar
 }

From 5d530b3c494b9bcc55be434bfa1f9efaeffcd978 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Thu, 3 Dec 2020 14:32:31 -0600
Subject: [PATCH 3/4] Fix template file - lint not successful

---
 srcpkgs/insomnia/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index f357bd3b0bb..e82b1e2fa36 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -28,9 +28,9 @@ do_install() {
 	vmkdir usr/lib/insomnia
 	vcopy packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/* usr/lib/insomnia
 
-    vmkdir usr/bin
-    ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
-    
+	vmkdir usr/bin
+	ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
+
 	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
 
 	for size in 16 32 48 128; do

From c8c846b6225a3e2c34bc5fcab789179167411ce1 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Fri, 4 Dec 2020 19:24:08 -0600
Subject: [PATCH 4/4] Update to 2020.5.1

---
 srcpkgs/insomnia/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index e82b1e2fa36..dfb47f47ec6 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -1,6 +1,6 @@
 # Template file for 'insomnia'
 pkgname=insomnia
-version=2020.5.0
+version=2020.5.1
 revision=1
 archs="x86_64"
 wrksrc="insomnia-core-${version}"
@@ -12,7 +12,7 @@ maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
 license="MIT"
 homepage="https://insomnia.rest"
 distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
-checksum=743360f5798f8e94c785b778644eaf47bff4c9c9bb0c5ca03969267cea6074c0
+checksum=439298cdfe48ff62a363bb8e1a8a49396560242a3918e6f620e8ec847bc7f63a
 nostrip_files="insomnia"
 
 pre_build() {

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Updated] New package: insomnia-2020.5.1
  2020-11-23 16:56 [PR PATCH] New package: insomnia-2020.4.2 kedodrill
                   ` (6 preceding siblings ...)
  2020-12-05  1:24 ` [PR PATCH] [Updated] New package: insomnia-2020.5.0 kedodrill
@ 2020-12-11  0:13 ` kedodrill
  2020-12-11  0:14 ` New package: insomnia-2020.5.2 kedodrill
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: kedodrill @ 2020-12-11  0:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]

There is an updated pull request by kedodrill against master on the void-packages repository

https://github.com/kedodrill/void-packages insomnia
https://github.com/void-linux/void-packages/pull/26647

New package: insomnia-2020.5.1
Closes #11311
Closes void-linux#23948

The patches that I have made are required because the nodejs build script will first try the `preinstall` script. Since the Void nodejs version is `12.18.4` instead of `12.18.3`, it will fail. I think the minor version bump is not worth dealing with `nvm` or `n` to get that specific version, but I can change this if need be.

`ffmpeg` is required for the executable, but it provides this when creating the package.

I have tested this with the `-Q` option.
This is my first package, I mostly tried to build it around the Signal-Desktop package. Please let me know if anything can be better / needs to be changed :)

I have been using this package quite frequently for work and it has been working great.

A patch file from https://github.com/void-linux/void-packages/pull/26647.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-insomnia-26647.patch --]
[-- Type: text/x-diff, Size: 13594 bytes --]

From cce9bca643acc40b8b43f42f535ccb966da3edf0 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Mon, 23 Nov 2020 10:42:54 -0600
Subject: [PATCH 1/5] Ref void-linux/issues#11311

* Add all files and patches
---
 srcpkgs/insomnia/files/insomnia               |  2 ++
 srcpkgs/insomnia/files/insomnia.desktop       | 11 ++++++++
 .../patches/remove-nodejs-version-check.patch | 14 ++++++++++
 .../patches/remove-preinstall-step.patch      | 10 +++++++
 srcpkgs/insomnia/template                     | 28 +++++++++++++++++++
 5 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/insomnia/files/insomnia
 create mode 100644 srcpkgs/insomnia/files/insomnia.desktop
 create mode 100644 srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
 create mode 100644 srcpkgs/insomnia/patches/remove-preinstall-step.patch
 create mode 100644 srcpkgs/insomnia/template

diff --git a/srcpkgs/insomnia/files/insomnia b/srcpkgs/insomnia/files/insomnia
new file mode 100644
index 00000000000..d9f0e988b9c
--- /dev/null
+++ b/srcpkgs/insomnia/files/insomnia
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec electron9 /usr/lib/insomnia.asar "$@"
\ No newline at end of file
diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
new file mode 100644
index 00000000000..73b9540c78e
--- /dev/null
+++ b/srcpkgs/insomnia/files/insomnia.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Insomnia
+Comment=Design and debug APIs like a human, not a robot.
+GenericName=The Desktop API client for REST and GraphQL
+Exec=/usr/bin/insomnia
+Icon=insomnia
+Type=Application
+StartupNotify=false
+StartupWMClass=Insomnia
+Categories=Utility;Development;
+Keywords=rest;graphql;request;
\ No newline at end of file
diff --git a/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
new file mode 100644
index 00000000000..7df2dabba07
--- /dev/null
+++ b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
@@ -0,0 +1,14 @@
+--- packages/insomnia-app/scripts/build.js	2020-10-21 06:53:51.000000000 -0500
++++ packages/insomnia-app/scripts/build.js	2020-11-22 23:28:58.338186804 -0600
+@@ -56,11 +56,6 @@
+   console.log(`[build] npm: ${childProcess.spawnSync('npm', ['--version']).stdout}`.trim());
+   console.log(`[build] node: ${childProcess.spawnSync('node', ['--version']).stdout}`.trim());
+ 
+-  if (process.version.indexOf('v12.') !== 0) {
+-    console.log('[build] Node v12.x.x is required to build');
+-    process.exit(1);
+-  }
+-
+   // Remove folders first
+   console.log('[build] Removing existing directories');
+   await emptyDir(buildFolder);
diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
new file mode 100644
index 00000000000..232bf31cc8a
--- /dev/null
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -0,0 +1,10 @@
+--- package.json	2020-10-21 06:53:51.000000000 -0500
++++ package.json	2020-11-23 00:21:57.194334606 -0600
+@@ -24,7 +24,6 @@
+     "app-release": "npm run release --prefix packages/insomnia-app",
+     "storybook-start": "npm run storybook --prefix packages/insomnia-components",
+     "storybook-legacy-start": "npm run storybook --prefix packages/insomnia-app",
+-    "preinstall": "node ./scripts/check-version.js",
+     "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
+     "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
+     "test:smoke:core": "npm run test:core:build --prefix packages/insomnia-smoke-test",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
new file mode 100644
index 00000000000..d0af8d3fc1c
--- /dev/null
+++ b/srcpkgs/insomnia/template
@@ -0,0 +1,28 @@
+# Template file for 'insomnia'
+pkgname=insomnia
+version=2020.4.2
+revision=1
+archs="x86_64"
+wrksrc="insomnia-core-${version}"
+hostmakedepends="git nodejs-lts curl tar"
+makedepends="electron9 python3 libcurl-devel make fontconfig-devel"
+depends="electron9 ffmpeg"
+short_desc="Desktop API client for REST and GraphQL"
+maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
+license="MIT"
+homepage="https://insomnia.rest"
+distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
+checksum=0b40fc4b347b5142e7a09a6488578ea3e30d050a3efc1146d6f1e0c7aed1de0d
+
+do_build() {
+	npm run bootstrap
+	GIT_TAG="core@${version}" npm run app-package
+}
+
+do_install() {
+	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
+	vbin "$FILESDIR/insomnia"
+	vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_512.png 644 usr/share/icons/hicolor/512x512/apps insomnia.png
+	vlicense LICENSE
+	vinstall "packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/resources/app.asar" 644 /usr/lib insomnia.asar
+}

From 258f6adc6488a91d4a63c1a2ad1f3929312444b2 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Thu, 3 Dec 2020 14:27:54 -0600
Subject: [PATCH 2/5] Update to 5.0 and switch template to different build
 style

* Using template more similar to Signal-Desktop now
---
 srcpkgs/insomnia/files/insomnia               |  2 --
 srcpkgs/insomnia/files/insomnia.desktop       |  2 +-
 .../patches/remove-preinstall-step.patch      |  6 ++--
 srcpkgs/insomnia/template                     | 33 ++++++++++++++-----
 4 files changed, 29 insertions(+), 14 deletions(-)
 delete mode 100644 srcpkgs/insomnia/files/insomnia

diff --git a/srcpkgs/insomnia/files/insomnia b/srcpkgs/insomnia/files/insomnia
deleted file mode 100644
index d9f0e988b9c..00000000000
--- a/srcpkgs/insomnia/files/insomnia
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec electron9 /usr/lib/insomnia.asar "$@"
\ No newline at end of file
diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
index 73b9540c78e..1081093ed04 100644
--- a/srcpkgs/insomnia/files/insomnia.desktop
+++ b/srcpkgs/insomnia/files/insomnia.desktop
@@ -2,7 +2,7 @@
 Name=Insomnia
 Comment=Design and debug APIs like a human, not a robot.
 GenericName=The Desktop API client for REST and GraphQL
-Exec=/usr/bin/insomnia
+Exec=insomnia
 Icon=insomnia
 Type=Application
 StartupNotify=false
diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
index 232bf31cc8a..7db2858f12b 100644
--- a/srcpkgs/insomnia/patches/remove-preinstall-step.patch
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -1,5 +1,5 @@
---- package.json	2020-10-21 06:53:51.000000000 -0500
-+++ package.json	2020-11-23 00:21:57.194334606 -0600
+--- package.json	2020-12-02 09:40:05.169126515 -0600
++++ package.json	2020-12-02 09:40:51.452756863 -0600
 @@ -24,7 +24,6 @@
      "app-release": "npm run release --prefix packages/insomnia-app",
      "storybook-start": "npm run storybook --prefix packages/insomnia-components",
@@ -7,4 +7,4 @@
 -    "preinstall": "node ./scripts/check-version.js",
      "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
      "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
-     "test:smoke:core": "npm run test:core:build --prefix packages/insomnia-smoke-test",
+     "app-package:smoke:core": "cross-env SMOKE_TEST=core npm run app-package",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index d0af8d3fc1c..f357bd3b0bb 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -1,28 +1,45 @@
 # Template file for 'insomnia'
 pkgname=insomnia
-version=2020.4.2
+version=2020.5.0
 revision=1
 archs="x86_64"
 wrksrc="insomnia-core-${version}"
 hostmakedepends="git nodejs-lts curl tar"
-makedepends="electron9 python3 libcurl-devel make fontconfig-devel"
-depends="electron9 ffmpeg"
+makedepends="python3 libcurl-devel make fontconfig-devel"
+depends="ffmpeg"
 short_desc="Desktop API client for REST and GraphQL"
 maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
 license="MIT"
 homepage="https://insomnia.rest"
 distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
-checksum=0b40fc4b347b5142e7a09a6488578ea3e30d050a3efc1146d6f1e0c7aed1de0d
+checksum=743360f5798f8e94c785b778644eaf47bff4c9c9bb0c5ca03969267cea6074c0
+nostrip_files="insomnia"
 
-do_build() {
+pre_build() {
 	npm run bootstrap
+	npm run test
+}
+
+do_build() {
 	GIT_TAG="core@${version}" npm run app-package
 }
 
 do_install() {
+	vmkdir usr/lib/insomnia
+	vcopy packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/* usr/lib/insomnia
+
+    vmkdir usr/bin
+    ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
+    
 	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
-	vbin "$FILESDIR/insomnia"
-	vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_512.png 644 usr/share/icons/hicolor/512x512/apps insomnia.png
+
+	for size in 16 32 48 128; do
+		vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_${size}x${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
+	done
+
+	for size in 256 512; do
+		vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
+	done
+
 	vlicense LICENSE
-	vinstall "packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/resources/app.asar" 644 /usr/lib insomnia.asar
 }

From 5d530b3c494b9bcc55be434bfa1f9efaeffcd978 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Thu, 3 Dec 2020 14:32:31 -0600
Subject: [PATCH 3/5] Fix template file - lint not successful

---
 srcpkgs/insomnia/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index f357bd3b0bb..e82b1e2fa36 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -28,9 +28,9 @@ do_install() {
 	vmkdir usr/lib/insomnia
 	vcopy packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/* usr/lib/insomnia
 
-    vmkdir usr/bin
-    ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
-    
+	vmkdir usr/bin
+	ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
+
 	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
 
 	for size in 16 32 48 128; do

From c8c846b6225a3e2c34bc5fcab789179167411ce1 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Fri, 4 Dec 2020 19:24:08 -0600
Subject: [PATCH 4/5] Update to 2020.5.1

---
 srcpkgs/insomnia/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index e82b1e2fa36..dfb47f47ec6 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -1,6 +1,6 @@
 # Template file for 'insomnia'
 pkgname=insomnia
-version=2020.5.0
+version=2020.5.1
 revision=1
 archs="x86_64"
 wrksrc="insomnia-core-${version}"
@@ -12,7 +12,7 @@ maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
 license="MIT"
 homepage="https://insomnia.rest"
 distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
-checksum=743360f5798f8e94c785b778644eaf47bff4c9c9bb0c5ca03969267cea6074c0
+checksum=439298cdfe48ff62a363bb8e1a8a49396560242a3918e6f620e8ec847bc7f63a
 nostrip_files="insomnia"
 
 pre_build() {

From 3eedcdf8f3aab7b00f5f52240d7c2df208211049 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Thu, 10 Dec 2020 18:12:34 -0600
Subject: [PATCH 5/5] Update to 2020.5.2

---
 srcpkgs/insomnia/patches/remove-preinstall-step.patch | 8 ++++----
 srcpkgs/insomnia/template                             | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
index 7db2858f12b..a7373409e8e 100644
--- a/srcpkgs/insomnia/patches/remove-preinstall-step.patch
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -1,10 +1,10 @@
---- package.json	2020-12-02 09:40:05.169126515 -0600
-+++ package.json	2020-12-02 09:40:51.452756863 -0600
-@@ -24,7 +24,6 @@
+--- package.json	2020-12-09 17:09:49.557660838 -0600
++++ package.json	2020-12-09 17:10:15.822038145 -0600
+@@ -23,7 +23,6 @@
      "app-release": "npm run release --prefix packages/insomnia-app",
      "storybook-start": "npm run storybook --prefix packages/insomnia-components",
      "storybook-legacy-start": "npm run storybook --prefix packages/insomnia-app",
 -    "preinstall": "node ./scripts/check-version.js",
      "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
      "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
-     "app-package:smoke:core": "cross-env SMOKE_TEST=core npm run app-package",
+     "test:smoke:core:build": "npm run test:core:build --prefix packages/insomnia-smoke-test",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index dfb47f47ec6..36573c9ed64 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -1,6 +1,6 @@
 # Template file for 'insomnia'
 pkgname=insomnia
-version=2020.5.1
+version=2020.5.2
 revision=1
 archs="x86_64"
 wrksrc="insomnia-core-${version}"
@@ -12,7 +12,7 @@ maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
 license="MIT"
 homepage="https://insomnia.rest"
 distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
-checksum=439298cdfe48ff62a363bb8e1a8a49396560242a3918e6f620e8ec847bc7f63a
+checksum=90cf54bb75af7863bcd8ebb3e0dc693476d9dc9f2af2a8e3327feb552d1796b1
 nostrip_files="insomnia"
 
 pre_build() {

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New package: insomnia-2020.5.2
  2020-11-23 16:56 [PR PATCH] New package: insomnia-2020.4.2 kedodrill
                   ` (7 preceding siblings ...)
  2020-12-11  0:13 ` [PR PATCH] [Updated] New package: insomnia-2020.5.1 kedodrill
@ 2020-12-11  0:14 ` kedodrill
  2021-03-11  2:59 ` [PR PATCH] [Updated] " kedodrill
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: kedodrill @ 2020-12-11  0:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 275 bytes --]

New comment by kedodrill on void-packages repository

https://github.com/void-linux/void-packages/pull/26647#issuecomment-737433736

Comment:
I have updated this for 2020.5.2. I included running the tests and changed the template style to something more like Signal-Desktop.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Updated] New package: insomnia-2020.5.2
  2020-11-23 16:56 [PR PATCH] New package: insomnia-2020.4.2 kedodrill
                   ` (8 preceding siblings ...)
  2020-12-11  0:14 ` New package: insomnia-2020.5.2 kedodrill
@ 2021-03-11  2:59 ` kedodrill
  2021-03-28 17:33 ` [PR PATCH] [Updated] New package: insomnia-2021.1.1 kedodrill
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: kedodrill @ 2021-03-11  2:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]

There is an updated pull request by kedodrill against master on the void-packages repository

https://github.com/kedodrill/void-packages insomnia
https://github.com/void-linux/void-packages/pull/26647

New package: insomnia-2020.5.2
Closes #11311
Closes void-linux#23948

The patches that I have made are required because the nodejs build script will first try the `preinstall` script. Since the Void nodejs version is `12.18.4` instead of `12.18.3`, it will fail. I think the minor version bump is not worth dealing with `nvm` or `n` to get that specific version, but I can change this if need be.

`ffmpeg` is required for the executable, but it provides this when creating the package.

I have tested this with the `-Q` option.
This is my first package, I mostly tried to build it around the Signal-Desktop package. Please let me know if anything can be better / needs to be changed :)

I have been using this package quite frequently for work and it has been working great.

A patch file from https://github.com/void-linux/void-packages/pull/26647.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-insomnia-26647.patch --]
[-- Type: text/x-diff, Size: 18861 bytes --]

From cce9bca643acc40b8b43f42f535ccb966da3edf0 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Mon, 23 Nov 2020 10:42:54 -0600
Subject: [PATCH 1/6] Ref void-linux/issues#11311

* Add all files and patches
---
 srcpkgs/insomnia/files/insomnia               |  2 ++
 srcpkgs/insomnia/files/insomnia.desktop       | 11 ++++++++
 .../patches/remove-nodejs-version-check.patch | 14 ++++++++++
 .../patches/remove-preinstall-step.patch      | 10 +++++++
 srcpkgs/insomnia/template                     | 28 +++++++++++++++++++
 5 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/insomnia/files/insomnia
 create mode 100644 srcpkgs/insomnia/files/insomnia.desktop
 create mode 100644 srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
 create mode 100644 srcpkgs/insomnia/patches/remove-preinstall-step.patch
 create mode 100644 srcpkgs/insomnia/template

diff --git a/srcpkgs/insomnia/files/insomnia b/srcpkgs/insomnia/files/insomnia
new file mode 100644
index 000000000000..d9f0e988b9cb
--- /dev/null
+++ b/srcpkgs/insomnia/files/insomnia
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec electron9 /usr/lib/insomnia.asar "$@"
\ No newline at end of file
diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
new file mode 100644
index 000000000000..73b9540c78e9
--- /dev/null
+++ b/srcpkgs/insomnia/files/insomnia.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Insomnia
+Comment=Design and debug APIs like a human, not a robot.
+GenericName=The Desktop API client for REST and GraphQL
+Exec=/usr/bin/insomnia
+Icon=insomnia
+Type=Application
+StartupNotify=false
+StartupWMClass=Insomnia
+Categories=Utility;Development;
+Keywords=rest;graphql;request;
\ No newline at end of file
diff --git a/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
new file mode 100644
index 000000000000..7df2dabba072
--- /dev/null
+++ b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
@@ -0,0 +1,14 @@
+--- packages/insomnia-app/scripts/build.js	2020-10-21 06:53:51.000000000 -0500
++++ packages/insomnia-app/scripts/build.js	2020-11-22 23:28:58.338186804 -0600
+@@ -56,11 +56,6 @@
+   console.log(`[build] npm: ${childProcess.spawnSync('npm', ['--version']).stdout}`.trim());
+   console.log(`[build] node: ${childProcess.spawnSync('node', ['--version']).stdout}`.trim());
+ 
+-  if (process.version.indexOf('v12.') !== 0) {
+-    console.log('[build] Node v12.x.x is required to build');
+-    process.exit(1);
+-  }
+-
+   // Remove folders first
+   console.log('[build] Removing existing directories');
+   await emptyDir(buildFolder);
diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
new file mode 100644
index 000000000000..232bf31cc8a8
--- /dev/null
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -0,0 +1,10 @@
+--- package.json	2020-10-21 06:53:51.000000000 -0500
++++ package.json	2020-11-23 00:21:57.194334606 -0600
+@@ -24,7 +24,6 @@
+     "app-release": "npm run release --prefix packages/insomnia-app",
+     "storybook-start": "npm run storybook --prefix packages/insomnia-components",
+     "storybook-legacy-start": "npm run storybook --prefix packages/insomnia-app",
+-    "preinstall": "node ./scripts/check-version.js",
+     "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
+     "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
+     "test:smoke:core": "npm run test:core:build --prefix packages/insomnia-smoke-test",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
new file mode 100644
index 000000000000..d0af8d3fc1c2
--- /dev/null
+++ b/srcpkgs/insomnia/template
@@ -0,0 +1,28 @@
+# Template file for 'insomnia'
+pkgname=insomnia
+version=2020.4.2
+revision=1
+archs="x86_64"
+wrksrc="insomnia-core-${version}"
+hostmakedepends="git nodejs-lts curl tar"
+makedepends="electron9 python3 libcurl-devel make fontconfig-devel"
+depends="electron9 ffmpeg"
+short_desc="Desktop API client for REST and GraphQL"
+maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
+license="MIT"
+homepage="https://insomnia.rest"
+distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
+checksum=0b40fc4b347b5142e7a09a6488578ea3e30d050a3efc1146d6f1e0c7aed1de0d
+
+do_build() {
+	npm run bootstrap
+	GIT_TAG="core@${version}" npm run app-package
+}
+
+do_install() {
+	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
+	vbin "$FILESDIR/insomnia"
+	vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_512.png 644 usr/share/icons/hicolor/512x512/apps insomnia.png
+	vlicense LICENSE
+	vinstall "packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/resources/app.asar" 644 /usr/lib insomnia.asar
+}

From 258f6adc6488a91d4a63c1a2ad1f3929312444b2 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Thu, 3 Dec 2020 14:27:54 -0600
Subject: [PATCH 2/6] Update to 5.0 and switch template to different build
 style

* Using template more similar to Signal-Desktop now
---
 srcpkgs/insomnia/files/insomnia               |  2 --
 srcpkgs/insomnia/files/insomnia.desktop       |  2 +-
 .../patches/remove-preinstall-step.patch      |  6 ++--
 srcpkgs/insomnia/template                     | 33 ++++++++++++++-----
 4 files changed, 29 insertions(+), 14 deletions(-)
 delete mode 100644 srcpkgs/insomnia/files/insomnia

diff --git a/srcpkgs/insomnia/files/insomnia b/srcpkgs/insomnia/files/insomnia
deleted file mode 100644
index d9f0e988b9cb..000000000000
--- a/srcpkgs/insomnia/files/insomnia
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec electron9 /usr/lib/insomnia.asar "$@"
\ No newline at end of file
diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
index 73b9540c78e9..1081093ed04d 100644
--- a/srcpkgs/insomnia/files/insomnia.desktop
+++ b/srcpkgs/insomnia/files/insomnia.desktop
@@ -2,7 +2,7 @@
 Name=Insomnia
 Comment=Design and debug APIs like a human, not a robot.
 GenericName=The Desktop API client for REST and GraphQL
-Exec=/usr/bin/insomnia
+Exec=insomnia
 Icon=insomnia
 Type=Application
 StartupNotify=false
diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
index 232bf31cc8a8..7db2858f12ba 100644
--- a/srcpkgs/insomnia/patches/remove-preinstall-step.patch
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -1,5 +1,5 @@
---- package.json	2020-10-21 06:53:51.000000000 -0500
-+++ package.json	2020-11-23 00:21:57.194334606 -0600
+--- package.json	2020-12-02 09:40:05.169126515 -0600
++++ package.json	2020-12-02 09:40:51.452756863 -0600
 @@ -24,7 +24,6 @@
      "app-release": "npm run release --prefix packages/insomnia-app",
      "storybook-start": "npm run storybook --prefix packages/insomnia-components",
@@ -7,4 +7,4 @@
 -    "preinstall": "node ./scripts/check-version.js",
      "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
      "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
-     "test:smoke:core": "npm run test:core:build --prefix packages/insomnia-smoke-test",
+     "app-package:smoke:core": "cross-env SMOKE_TEST=core npm run app-package",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index d0af8d3fc1c2..f357bd3b0bba 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -1,28 +1,45 @@
 # Template file for 'insomnia'
 pkgname=insomnia
-version=2020.4.2
+version=2020.5.0
 revision=1
 archs="x86_64"
 wrksrc="insomnia-core-${version}"
 hostmakedepends="git nodejs-lts curl tar"
-makedepends="electron9 python3 libcurl-devel make fontconfig-devel"
-depends="electron9 ffmpeg"
+makedepends="python3 libcurl-devel make fontconfig-devel"
+depends="ffmpeg"
 short_desc="Desktop API client for REST and GraphQL"
 maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
 license="MIT"
 homepage="https://insomnia.rest"
 distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
-checksum=0b40fc4b347b5142e7a09a6488578ea3e30d050a3efc1146d6f1e0c7aed1de0d
+checksum=743360f5798f8e94c785b778644eaf47bff4c9c9bb0c5ca03969267cea6074c0
+nostrip_files="insomnia"
 
-do_build() {
+pre_build() {
 	npm run bootstrap
+	npm run test
+}
+
+do_build() {
 	GIT_TAG="core@${version}" npm run app-package
 }
 
 do_install() {
+	vmkdir usr/lib/insomnia
+	vcopy packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/* usr/lib/insomnia
+
+    vmkdir usr/bin
+    ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
+    
 	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
-	vbin "$FILESDIR/insomnia"
-	vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_512.png 644 usr/share/icons/hicolor/512x512/apps insomnia.png
+
+	for size in 16 32 48 128; do
+		vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_${size}x${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
+	done
+
+	for size in 256 512; do
+		vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
+	done
+
 	vlicense LICENSE
-	vinstall "packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/resources/app.asar" 644 /usr/lib insomnia.asar
 }

From 5d530b3c494b9bcc55be434bfa1f9efaeffcd978 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Thu, 3 Dec 2020 14:32:31 -0600
Subject: [PATCH 3/6] Fix template file - lint not successful

---
 srcpkgs/insomnia/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index f357bd3b0bba..e82b1e2fa367 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -28,9 +28,9 @@ do_install() {
 	vmkdir usr/lib/insomnia
 	vcopy packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/* usr/lib/insomnia
 
-    vmkdir usr/bin
-    ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
-    
+	vmkdir usr/bin
+	ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
+
 	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
 
 	for size in 16 32 48 128; do

From c8c846b6225a3e2c34bc5fcab789179167411ce1 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Fri, 4 Dec 2020 19:24:08 -0600
Subject: [PATCH 4/6] Update to 2020.5.1

---
 srcpkgs/insomnia/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index e82b1e2fa367..dfb47f47ec64 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -1,6 +1,6 @@
 # Template file for 'insomnia'
 pkgname=insomnia
-version=2020.5.0
+version=2020.5.1
 revision=1
 archs="x86_64"
 wrksrc="insomnia-core-${version}"
@@ -12,7 +12,7 @@ maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
 license="MIT"
 homepage="https://insomnia.rest"
 distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
-checksum=743360f5798f8e94c785b778644eaf47bff4c9c9bb0c5ca03969267cea6074c0
+checksum=439298cdfe48ff62a363bb8e1a8a49396560242a3918e6f620e8ec847bc7f63a
 nostrip_files="insomnia"
 
 pre_build() {

From 3eedcdf8f3aab7b00f5f52240d7c2df208211049 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Thu, 10 Dec 2020 18:12:34 -0600
Subject: [PATCH 5/6] Update to 2020.5.2

---
 srcpkgs/insomnia/patches/remove-preinstall-step.patch | 8 ++++----
 srcpkgs/insomnia/template                             | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
index 7db2858f12ba..a7373409e8ed 100644
--- a/srcpkgs/insomnia/patches/remove-preinstall-step.patch
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -1,10 +1,10 @@
---- package.json	2020-12-02 09:40:05.169126515 -0600
-+++ package.json	2020-12-02 09:40:51.452756863 -0600
-@@ -24,7 +24,6 @@
+--- package.json	2020-12-09 17:09:49.557660838 -0600
++++ package.json	2020-12-09 17:10:15.822038145 -0600
+@@ -23,7 +23,6 @@
      "app-release": "npm run release --prefix packages/insomnia-app",
      "storybook-start": "npm run storybook --prefix packages/insomnia-components",
      "storybook-legacy-start": "npm run storybook --prefix packages/insomnia-app",
 -    "preinstall": "node ./scripts/check-version.js",
      "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
      "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
-     "app-package:smoke:core": "cross-env SMOKE_TEST=core npm run app-package",
+     "test:smoke:core:build": "npm run test:core:build --prefix packages/insomnia-smoke-test",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index dfb47f47ec64..36573c9ed645 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -1,6 +1,6 @@
 # Template file for 'insomnia'
 pkgname=insomnia
-version=2020.5.1
+version=2020.5.2
 revision=1
 archs="x86_64"
 wrksrc="insomnia-core-${version}"
@@ -12,7 +12,7 @@ maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
 license="MIT"
 homepage="https://insomnia.rest"
 distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
-checksum=439298cdfe48ff62a363bb8e1a8a49396560242a3918e6f620e8ec847bc7f63a
+checksum=90cf54bb75af7863bcd8ebb3e0dc693476d9dc9f2af2a8e3327feb552d1796b1
 nostrip_files="insomnia"
 
 pre_build() {

From 5493aff40210c1aa37daeca0d23eba0ed0a844d1 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Wed, 10 Mar 2021 20:55:57 -0600
Subject: [PATCH 6/6] Update to 2021.1.1

---
 srcpkgs/insomnia/files/insomnia.desktop              |  4 ++--
 .../patches/remove-nodejs-version-check.patch        |  6 +++---
 .../insomnia/patches/remove-preinstall-step.patch    | 12 ++++++------
 srcpkgs/insomnia/template                            | 10 +++++-----
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
index 1081093ed04d..5bcb7f317f90 100644
--- a/srcpkgs/insomnia/files/insomnia.desktop
+++ b/srcpkgs/insomnia/files/insomnia.desktop
@@ -1,11 +1,11 @@
 [Desktop Entry]
 Name=Insomnia
 Comment=Design and debug APIs like a human, not a robot.
-GenericName=The Desktop API client for REST and GraphQL
+GenericName=The Open Source API Client and Design Platform for GraphQL, REST and gRPC
 Exec=insomnia
 Icon=insomnia
 Type=Application
 StartupNotify=false
 StartupWMClass=Insomnia
 Categories=Utility;Development;
-Keywords=rest;graphql;request;
\ No newline at end of file
+Keywords=rest;graphql;request;
diff --git a/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
index 7df2dabba072..4366f62a6ecd 100644
--- a/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
+++ b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
@@ -1,6 +1,6 @@
---- packages/insomnia-app/scripts/build.js	2020-10-21 06:53:51.000000000 -0500
-+++ packages/insomnia-app/scripts/build.js	2020-11-22 23:28:58.338186804 -0600
-@@ -56,11 +56,6 @@
+--- packages/insomnia-app/scripts/build.js	2021-03-09 22:33:38.000000000 -0600
++++ packages/insomnia-app/scripts/build.js	2021-03-10 11:13:42.894148116 -0600
+@@ -43,11 +43,6 @@
    console.log(`[build] npm: ${childProcess.spawnSync('npm', ['--version']).stdout}`.trim());
    console.log(`[build] node: ${childProcess.spawnSync('node', ['--version']).stdout}`.trim());
  
diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
index a7373409e8ed..aae65735e889 100644
--- a/srcpkgs/insomnia/patches/remove-preinstall-step.patch
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -1,10 +1,10 @@
---- package.json	2020-12-09 17:09:49.557660838 -0600
-+++ package.json	2020-12-09 17:10:15.822038145 -0600
-@@ -23,7 +23,6 @@
+--- package.json	2021-03-09 22:33:38.000000000 -0600
++++ package.json	2021-03-10 11:11:44.014474713 -0600
+@@ -24,7 +24,6 @@
      "app-release": "npm run release --prefix packages/insomnia-app",
      "storybook-start": "npm run storybook --prefix packages/insomnia-components",
      "storybook-legacy-start": "npm run storybook --prefix packages/insomnia-app",
 -    "preinstall": "node ./scripts/check-version.js",
-     "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
-     "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
-     "test:smoke:core:build": "npm run test:core:build --prefix packages/insomnia-smoke-test",
+     "app-build:smoke": "cross-env SMOKE_TEST=true npm run app-build",
+     "app-package:smoke": "cross-env SMOKE_TEST=true npm run app-package",
+     "test:smoke:build": "npm run test:build --prefix packages/insomnia-smoke-test",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index 36573c9ed645..c55f0c8712c1 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -1,6 +1,6 @@
 # Template file for 'insomnia'
 pkgname=insomnia
-version=2020.5.2
+version=2021.1.1
 revision=1
 archs="x86_64"
 wrksrc="insomnia-core-${version}"
@@ -12,7 +12,7 @@ maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
 license="MIT"
 homepage="https://insomnia.rest"
 distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
-checksum=90cf54bb75af7863bcd8ebb3e0dc693476d9dc9f2af2a8e3327feb552d1796b1
+checksum=1db6d86fa72952a265bdc900d19f4d1320554f62f30e2e1aa23b270c8afd4c2e
 nostrip_files="insomnia"
 
 pre_build() {
@@ -26,7 +26,7 @@ do_build() {
 
 do_install() {
 	vmkdir usr/lib/insomnia
-	vcopy packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/* usr/lib/insomnia
+	vcopy packages/insomnia-app/dist/linux-unpacked/* usr/lib/insomnia
 
 	vmkdir usr/bin
 	ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
@@ -34,11 +34,11 @@ do_install() {
 	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
 
 	for size in 16 32 48 128; do
-		vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_${size}x${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
+		vinstall packages/insomnia-app/dist/.icon-set/icon_${size}x${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
 	done
 
 	for size in 256 512; do
-		vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
+		vinstall packages/insomnia-app/dist/.icon-set/icon_${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
 	done
 
 	vlicense LICENSE

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Updated] New package: insomnia-2021.1.1
  2020-11-23 16:56 [PR PATCH] New package: insomnia-2020.4.2 kedodrill
                   ` (9 preceding siblings ...)
  2021-03-11  2:59 ` [PR PATCH] [Updated] " kedodrill
@ 2021-03-28 17:33 ` kedodrill
  2021-05-20 20:51 ` New package: insomnia-2021.2.1 kedodrill
  2021-05-20 20:51 ` [PR PATCH] [Closed]: " kedodrill
  12 siblings, 0 replies; 14+ messages in thread
From: kedodrill @ 2021-03-28 17:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]

There is an updated pull request by kedodrill against master on the void-packages repository

https://github.com/kedodrill/void-packages insomnia
https://github.com/void-linux/void-packages/pull/26647

New package: insomnia-2021.1.1
Closes #11311
Closes void-linux#23948

The patches that I have made are required because the nodejs build script will first try the `preinstall` script. Since the Void nodejs version is `12.18.4` instead of `12.18.3`, it will fail. I think the minor version bump is not worth dealing with `nvm` or `n` to get that specific version, but I can change this if need be.

`ffmpeg` is required for the executable, but it provides this when creating the package.

I have tested this with the `-Q` option.
This is my first package, I mostly tried to build it around the Signal-Desktop package. Please let me know if anything can be better / needs to be changed :)

I have been using this package quite frequently for work and it has been working great.

NOTE: Insomnia now bundles their REST client and API designer into one application since the 2021.1.0 release. So this contains that.

A patch file from https://github.com/void-linux/void-packages/pull/26647.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-insomnia-26647.patch --]
[-- Type: text/x-diff, Size: 20069 bytes --]

From cce9bca643acc40b8b43f42f535ccb966da3edf0 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Mon, 23 Nov 2020 10:42:54 -0600
Subject: [PATCH 1/7] Ref void-linux/issues#11311

* Add all files and patches
---
 srcpkgs/insomnia/files/insomnia               |  2 ++
 srcpkgs/insomnia/files/insomnia.desktop       | 11 ++++++++
 .../patches/remove-nodejs-version-check.patch | 14 ++++++++++
 .../patches/remove-preinstall-step.patch      | 10 +++++++
 srcpkgs/insomnia/template                     | 28 +++++++++++++++++++
 5 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/insomnia/files/insomnia
 create mode 100644 srcpkgs/insomnia/files/insomnia.desktop
 create mode 100644 srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
 create mode 100644 srcpkgs/insomnia/patches/remove-preinstall-step.patch
 create mode 100644 srcpkgs/insomnia/template

diff --git a/srcpkgs/insomnia/files/insomnia b/srcpkgs/insomnia/files/insomnia
new file mode 100644
index 000000000000..d9f0e988b9cb
--- /dev/null
+++ b/srcpkgs/insomnia/files/insomnia
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec electron9 /usr/lib/insomnia.asar "$@"
\ No newline at end of file
diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
new file mode 100644
index 000000000000..73b9540c78e9
--- /dev/null
+++ b/srcpkgs/insomnia/files/insomnia.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Insomnia
+Comment=Design and debug APIs like a human, not a robot.
+GenericName=The Desktop API client for REST and GraphQL
+Exec=/usr/bin/insomnia
+Icon=insomnia
+Type=Application
+StartupNotify=false
+StartupWMClass=Insomnia
+Categories=Utility;Development;
+Keywords=rest;graphql;request;
\ No newline at end of file
diff --git a/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
new file mode 100644
index 000000000000..7df2dabba072
--- /dev/null
+++ b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
@@ -0,0 +1,14 @@
+--- packages/insomnia-app/scripts/build.js	2020-10-21 06:53:51.000000000 -0500
++++ packages/insomnia-app/scripts/build.js	2020-11-22 23:28:58.338186804 -0600
+@@ -56,11 +56,6 @@
+   console.log(`[build] npm: ${childProcess.spawnSync('npm', ['--version']).stdout}`.trim());
+   console.log(`[build] node: ${childProcess.spawnSync('node', ['--version']).stdout}`.trim());
+ 
+-  if (process.version.indexOf('v12.') !== 0) {
+-    console.log('[build] Node v12.x.x is required to build');
+-    process.exit(1);
+-  }
+-
+   // Remove folders first
+   console.log('[build] Removing existing directories');
+   await emptyDir(buildFolder);
diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
new file mode 100644
index 000000000000..232bf31cc8a8
--- /dev/null
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -0,0 +1,10 @@
+--- package.json	2020-10-21 06:53:51.000000000 -0500
++++ package.json	2020-11-23 00:21:57.194334606 -0600
+@@ -24,7 +24,6 @@
+     "app-release": "npm run release --prefix packages/insomnia-app",
+     "storybook-start": "npm run storybook --prefix packages/insomnia-components",
+     "storybook-legacy-start": "npm run storybook --prefix packages/insomnia-app",
+-    "preinstall": "node ./scripts/check-version.js",
+     "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
+     "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
+     "test:smoke:core": "npm run test:core:build --prefix packages/insomnia-smoke-test",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
new file mode 100644
index 000000000000..d0af8d3fc1c2
--- /dev/null
+++ b/srcpkgs/insomnia/template
@@ -0,0 +1,28 @@
+# Template file for 'insomnia'
+pkgname=insomnia
+version=2020.4.2
+revision=1
+archs="x86_64"
+wrksrc="insomnia-core-${version}"
+hostmakedepends="git nodejs-lts curl tar"
+makedepends="electron9 python3 libcurl-devel make fontconfig-devel"
+depends="electron9 ffmpeg"
+short_desc="Desktop API client for REST and GraphQL"
+maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
+license="MIT"
+homepage="https://insomnia.rest"
+distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
+checksum=0b40fc4b347b5142e7a09a6488578ea3e30d050a3efc1146d6f1e0c7aed1de0d
+
+do_build() {
+	npm run bootstrap
+	GIT_TAG="core@${version}" npm run app-package
+}
+
+do_install() {
+	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
+	vbin "$FILESDIR/insomnia"
+	vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_512.png 644 usr/share/icons/hicolor/512x512/apps insomnia.png
+	vlicense LICENSE
+	vinstall "packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/resources/app.asar" 644 /usr/lib insomnia.asar
+}

From 258f6adc6488a91d4a63c1a2ad1f3929312444b2 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Thu, 3 Dec 2020 14:27:54 -0600
Subject: [PATCH 2/7] Update to 5.0 and switch template to different build
 style

* Using template more similar to Signal-Desktop now
---
 srcpkgs/insomnia/files/insomnia               |  2 --
 srcpkgs/insomnia/files/insomnia.desktop       |  2 +-
 .../patches/remove-preinstall-step.patch      |  6 ++--
 srcpkgs/insomnia/template                     | 33 ++++++++++++++-----
 4 files changed, 29 insertions(+), 14 deletions(-)
 delete mode 100644 srcpkgs/insomnia/files/insomnia

diff --git a/srcpkgs/insomnia/files/insomnia b/srcpkgs/insomnia/files/insomnia
deleted file mode 100644
index d9f0e988b9cb..000000000000
--- a/srcpkgs/insomnia/files/insomnia
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec electron9 /usr/lib/insomnia.asar "$@"
\ No newline at end of file
diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
index 73b9540c78e9..1081093ed04d 100644
--- a/srcpkgs/insomnia/files/insomnia.desktop
+++ b/srcpkgs/insomnia/files/insomnia.desktop
@@ -2,7 +2,7 @@
 Name=Insomnia
 Comment=Design and debug APIs like a human, not a robot.
 GenericName=The Desktop API client for REST and GraphQL
-Exec=/usr/bin/insomnia
+Exec=insomnia
 Icon=insomnia
 Type=Application
 StartupNotify=false
diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
index 232bf31cc8a8..7db2858f12ba 100644
--- a/srcpkgs/insomnia/patches/remove-preinstall-step.patch
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -1,5 +1,5 @@
---- package.json	2020-10-21 06:53:51.000000000 -0500
-+++ package.json	2020-11-23 00:21:57.194334606 -0600
+--- package.json	2020-12-02 09:40:05.169126515 -0600
++++ package.json	2020-12-02 09:40:51.452756863 -0600
 @@ -24,7 +24,6 @@
      "app-release": "npm run release --prefix packages/insomnia-app",
      "storybook-start": "npm run storybook --prefix packages/insomnia-components",
@@ -7,4 +7,4 @@
 -    "preinstall": "node ./scripts/check-version.js",
      "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
      "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
-     "test:smoke:core": "npm run test:core:build --prefix packages/insomnia-smoke-test",
+     "app-package:smoke:core": "cross-env SMOKE_TEST=core npm run app-package",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index d0af8d3fc1c2..f357bd3b0bba 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -1,28 +1,45 @@
 # Template file for 'insomnia'
 pkgname=insomnia
-version=2020.4.2
+version=2020.5.0
 revision=1
 archs="x86_64"
 wrksrc="insomnia-core-${version}"
 hostmakedepends="git nodejs-lts curl tar"
-makedepends="electron9 python3 libcurl-devel make fontconfig-devel"
-depends="electron9 ffmpeg"
+makedepends="python3 libcurl-devel make fontconfig-devel"
+depends="ffmpeg"
 short_desc="Desktop API client for REST and GraphQL"
 maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
 license="MIT"
 homepage="https://insomnia.rest"
 distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
-checksum=0b40fc4b347b5142e7a09a6488578ea3e30d050a3efc1146d6f1e0c7aed1de0d
+checksum=743360f5798f8e94c785b778644eaf47bff4c9c9bb0c5ca03969267cea6074c0
+nostrip_files="insomnia"
 
-do_build() {
+pre_build() {
 	npm run bootstrap
+	npm run test
+}
+
+do_build() {
 	GIT_TAG="core@${version}" npm run app-package
 }
 
 do_install() {
+	vmkdir usr/lib/insomnia
+	vcopy packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/* usr/lib/insomnia
+
+    vmkdir usr/bin
+    ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
+    
 	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
-	vbin "$FILESDIR/insomnia"
-	vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_512.png 644 usr/share/icons/hicolor/512x512/apps insomnia.png
+
+	for size in 16 32 48 128; do
+		vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_${size}x${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
+	done
+
+	for size in 256 512; do
+		vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
+	done
+
 	vlicense LICENSE
-	vinstall "packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/resources/app.asar" 644 /usr/lib insomnia.asar
 }

From 5d530b3c494b9bcc55be434bfa1f9efaeffcd978 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Thu, 3 Dec 2020 14:32:31 -0600
Subject: [PATCH 3/7] Fix template file - lint not successful

---
 srcpkgs/insomnia/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index f357bd3b0bba..e82b1e2fa367 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -28,9 +28,9 @@ do_install() {
 	vmkdir usr/lib/insomnia
 	vcopy packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/* usr/lib/insomnia
 
-    vmkdir usr/bin
-    ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
-    
+	vmkdir usr/bin
+	ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
+
 	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
 
 	for size in 16 32 48 128; do

From c8c846b6225a3e2c34bc5fcab789179167411ce1 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Fri, 4 Dec 2020 19:24:08 -0600
Subject: [PATCH 4/7] Update to 2020.5.1

---
 srcpkgs/insomnia/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index e82b1e2fa367..dfb47f47ec64 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -1,6 +1,6 @@
 # Template file for 'insomnia'
 pkgname=insomnia
-version=2020.5.0
+version=2020.5.1
 revision=1
 archs="x86_64"
 wrksrc="insomnia-core-${version}"
@@ -12,7 +12,7 @@ maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
 license="MIT"
 homepage="https://insomnia.rest"
 distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
-checksum=743360f5798f8e94c785b778644eaf47bff4c9c9bb0c5ca03969267cea6074c0
+checksum=439298cdfe48ff62a363bb8e1a8a49396560242a3918e6f620e8ec847bc7f63a
 nostrip_files="insomnia"
 
 pre_build() {

From 3eedcdf8f3aab7b00f5f52240d7c2df208211049 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Thu, 10 Dec 2020 18:12:34 -0600
Subject: [PATCH 5/7] Update to 2020.5.2

---
 srcpkgs/insomnia/patches/remove-preinstall-step.patch | 8 ++++----
 srcpkgs/insomnia/template                             | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
index 7db2858f12ba..a7373409e8ed 100644
--- a/srcpkgs/insomnia/patches/remove-preinstall-step.patch
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -1,10 +1,10 @@
---- package.json	2020-12-02 09:40:05.169126515 -0600
-+++ package.json	2020-12-02 09:40:51.452756863 -0600
-@@ -24,7 +24,6 @@
+--- package.json	2020-12-09 17:09:49.557660838 -0600
++++ package.json	2020-12-09 17:10:15.822038145 -0600
+@@ -23,7 +23,6 @@
      "app-release": "npm run release --prefix packages/insomnia-app",
      "storybook-start": "npm run storybook --prefix packages/insomnia-components",
      "storybook-legacy-start": "npm run storybook --prefix packages/insomnia-app",
 -    "preinstall": "node ./scripts/check-version.js",
      "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
      "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
-     "app-package:smoke:core": "cross-env SMOKE_TEST=core npm run app-package",
+     "test:smoke:core:build": "npm run test:core:build --prefix packages/insomnia-smoke-test",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index dfb47f47ec64..36573c9ed645 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -1,6 +1,6 @@
 # Template file for 'insomnia'
 pkgname=insomnia
-version=2020.5.1
+version=2020.5.2
 revision=1
 archs="x86_64"
 wrksrc="insomnia-core-${version}"
@@ -12,7 +12,7 @@ maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
 license="MIT"
 homepage="https://insomnia.rest"
 distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
-checksum=439298cdfe48ff62a363bb8e1a8a49396560242a3918e6f620e8ec847bc7f63a
+checksum=90cf54bb75af7863bcd8ebb3e0dc693476d9dc9f2af2a8e3327feb552d1796b1
 nostrip_files="insomnia"
 
 pre_build() {

From 5493aff40210c1aa37daeca0d23eba0ed0a844d1 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Wed, 10 Mar 2021 20:55:57 -0600
Subject: [PATCH 6/7] Update to 2021.1.1

---
 srcpkgs/insomnia/files/insomnia.desktop              |  4 ++--
 .../patches/remove-nodejs-version-check.patch        |  6 +++---
 .../insomnia/patches/remove-preinstall-step.patch    | 12 ++++++------
 srcpkgs/insomnia/template                            | 10 +++++-----
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/srcpkgs/insomnia/files/insomnia.desktop b/srcpkgs/insomnia/files/insomnia.desktop
index 1081093ed04d..5bcb7f317f90 100644
--- a/srcpkgs/insomnia/files/insomnia.desktop
+++ b/srcpkgs/insomnia/files/insomnia.desktop
@@ -1,11 +1,11 @@
 [Desktop Entry]
 Name=Insomnia
 Comment=Design and debug APIs like a human, not a robot.
-GenericName=The Desktop API client for REST and GraphQL
+GenericName=The Open Source API Client and Design Platform for GraphQL, REST and gRPC
 Exec=insomnia
 Icon=insomnia
 Type=Application
 StartupNotify=false
 StartupWMClass=Insomnia
 Categories=Utility;Development;
-Keywords=rest;graphql;request;
\ No newline at end of file
+Keywords=rest;graphql;request;
diff --git a/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
index 7df2dabba072..4366f62a6ecd 100644
--- a/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
+++ b/srcpkgs/insomnia/patches/remove-nodejs-version-check.patch
@@ -1,6 +1,6 @@
---- packages/insomnia-app/scripts/build.js	2020-10-21 06:53:51.000000000 -0500
-+++ packages/insomnia-app/scripts/build.js	2020-11-22 23:28:58.338186804 -0600
-@@ -56,11 +56,6 @@
+--- packages/insomnia-app/scripts/build.js	2021-03-09 22:33:38.000000000 -0600
++++ packages/insomnia-app/scripts/build.js	2021-03-10 11:13:42.894148116 -0600
+@@ -43,11 +43,6 @@
    console.log(`[build] npm: ${childProcess.spawnSync('npm', ['--version']).stdout}`.trim());
    console.log(`[build] node: ${childProcess.spawnSync('node', ['--version']).stdout}`.trim());
  
diff --git a/srcpkgs/insomnia/patches/remove-preinstall-step.patch b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
index a7373409e8ed..aae65735e889 100644
--- a/srcpkgs/insomnia/patches/remove-preinstall-step.patch
+++ b/srcpkgs/insomnia/patches/remove-preinstall-step.patch
@@ -1,10 +1,10 @@
---- package.json	2020-12-09 17:09:49.557660838 -0600
-+++ package.json	2020-12-09 17:10:15.822038145 -0600
-@@ -23,7 +23,6 @@
+--- package.json	2021-03-09 22:33:38.000000000 -0600
++++ package.json	2021-03-10 11:11:44.014474713 -0600
+@@ -24,7 +24,6 @@
      "app-release": "npm run release --prefix packages/insomnia-app",
      "storybook-start": "npm run storybook --prefix packages/insomnia-components",
      "storybook-legacy-start": "npm run storybook --prefix packages/insomnia-app",
 -    "preinstall": "node ./scripts/check-version.js",
-     "app-build:smoke:core": "cross-env SMOKE_TEST=core npm run app-build",
-     "app-build:smoke:designer": "cross-env SMOKE_TEST=designer npm run app-build",
-     "test:smoke:core:build": "npm run test:core:build --prefix packages/insomnia-smoke-test",
+     "app-build:smoke": "cross-env SMOKE_TEST=true npm run app-build",
+     "app-package:smoke": "cross-env SMOKE_TEST=true npm run app-package",
+     "test:smoke:build": "npm run test:build --prefix packages/insomnia-smoke-test",
diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index 36573c9ed645..c55f0c8712c1 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -1,6 +1,6 @@
 # Template file for 'insomnia'
 pkgname=insomnia
-version=2020.5.2
+version=2021.1.1
 revision=1
 archs="x86_64"
 wrksrc="insomnia-core-${version}"
@@ -12,7 +12,7 @@ maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
 license="MIT"
 homepage="https://insomnia.rest"
 distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
-checksum=90cf54bb75af7863bcd8ebb3e0dc693476d9dc9f2af2a8e3327feb552d1796b1
+checksum=1db6d86fa72952a265bdc900d19f4d1320554f62f30e2e1aa23b270c8afd4c2e
 nostrip_files="insomnia"
 
 pre_build() {
@@ -26,7 +26,7 @@ do_build() {
 
 do_install() {
 	vmkdir usr/lib/insomnia
-	vcopy packages/insomnia-app/dist/com.insomnia.app/linux-unpacked/* usr/lib/insomnia
+	vcopy packages/insomnia-app/dist/linux-unpacked/* usr/lib/insomnia
 
 	vmkdir usr/bin
 	ln -s /usr/lib/insomnia/insomnia ${DESTDIR}/usr/bin/
@@ -34,11 +34,11 @@ do_install() {
 	vinstall "${FILESDIR}/insomnia.desktop" 644 usr/share/applications
 
 	for size in 16 32 48 128; do
-		vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_${size}x${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
+		vinstall packages/insomnia-app/dist/.icon-set/icon_${size}x${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
 	done
 
 	for size in 256 512; do
-		vinstall packages/insomnia-app/dist/com.insomnia.app/.icon-set/icon_${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
+		vinstall packages/insomnia-app/dist/.icon-set/icon_${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ insomnia.png
 	done
 
 	vlicense LICENSE

From f6ded18958aa0ce41c72201361627a35cb312301 Mon Sep 17 00:00:00 2001
From: Kenneth Dodrill <kmdodrill@protonmail.com>
Date: Sun, 28 Mar 2021 12:32:08 -0500
Subject: [PATCH 7/7] Update to 2021.2.1

---
 srcpkgs/insomnia/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/insomnia/template b/srcpkgs/insomnia/template
index c55f0c8712c1..0d7d1eb7e513 100644
--- a/srcpkgs/insomnia/template
+++ b/srcpkgs/insomnia/template
@@ -1,18 +1,18 @@
 # Template file for 'insomnia'
 pkgname=insomnia
-version=2021.1.1
+version=2021.2.1
 revision=1
 archs="x86_64"
 wrksrc="insomnia-core-${version}"
 hostmakedepends="git nodejs-lts curl tar"
 makedepends="python3 libcurl-devel make fontconfig-devel"
-depends="ffmpeg"
+depends="ffmpeg electron9"
 short_desc="Desktop API client for REST and GraphQL"
 maintainer="Kenneth Dodrill <kmdodrill@protonmail.com>"
 license="MIT"
 homepage="https://insomnia.rest"
 distfiles="https://github.com/Kong/insomnia/archive/core@${version}.tar.gz"
-checksum=1db6d86fa72952a265bdc900d19f4d1320554f62f30e2e1aa23b270c8afd4c2e
+checksum=30d8638d359b55e03acd502c18fb7cdd46f21d475aaa6b4d83b8fc79ef79893c
 nostrip_files="insomnia"
 
 pre_build() {

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New package: insomnia-2021.2.1
  2020-11-23 16:56 [PR PATCH] New package: insomnia-2020.4.2 kedodrill
                   ` (10 preceding siblings ...)
  2021-03-28 17:33 ` [PR PATCH] [Updated] New package: insomnia-2021.1.1 kedodrill
@ 2021-05-20 20:51 ` kedodrill
  2021-05-20 20:51 ` [PR PATCH] [Closed]: " kedodrill
  12 siblings, 0 replies; 14+ messages in thread
From: kedodrill @ 2021-05-20 20:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 172 bytes --]

New comment by kedodrill on void-packages repository

https://github.com/void-linux/void-packages/pull/26647#issuecomment-845468519

Comment:
I no longer use this software

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PR PATCH] [Closed]: New package: insomnia-2021.2.1
  2020-11-23 16:56 [PR PATCH] New package: insomnia-2020.4.2 kedodrill
                   ` (11 preceding siblings ...)
  2021-05-20 20:51 ` New package: insomnia-2021.2.1 kedodrill
@ 2021-05-20 20:51 ` kedodrill
  12 siblings, 0 replies; 14+ messages in thread
From: kedodrill @ 2021-05-20 20:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]

There's a closed pull request on the void-packages repository

New package: insomnia-2021.2.1
https://github.com/void-linux/void-packages/pull/26647

Description:
Closes #11311
Closes void-linux#23948

The patches that I have made are required because the nodejs build script will first try the `preinstall` script. Since the Void nodejs version is `12.18.4` instead of `12.18.3`, it will fail. I think the minor version bump is not worth dealing with `nvm` or `n` to get that specific version, but I can change this if need be.

`ffmpeg` is required for the executable, but it provides this when creating the package.

I have tested this with the `-Q` option.
This is my first package, I mostly tried to build it around the Signal-Desktop package. Please let me know if anything can be better / needs to be changed :)

I have been using this package quite frequently for work and it has been working great.

NOTE: Insomnia now bundles their REST client and API designer into one application since the 2021.1.0 release. So this contains that.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-05-20 20:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 16:56 [PR PATCH] New package: insomnia-2020.4.2 kedodrill
2020-12-02 19:05 ` kedodrill
2020-12-03 16:09 ` kedodrill
2020-12-03 20:29 ` [PR PATCH] [Updated] " kedodrill
2020-12-03 20:31 ` kedodrill
2020-12-03 20:32 ` [PR PATCH] [Updated] " kedodrill
2020-12-03 21:51 ` kedodrill
2020-12-05  1:24 ` [PR PATCH] [Updated] New package: insomnia-2020.5.0 kedodrill
2020-12-11  0:13 ` [PR PATCH] [Updated] New package: insomnia-2020.5.1 kedodrill
2020-12-11  0:14 ` New package: insomnia-2020.5.2 kedodrill
2021-03-11  2:59 ` [PR PATCH] [Updated] " kedodrill
2021-03-28 17:33 ` [PR PATCH] [Updated] New package: insomnia-2021.1.1 kedodrill
2021-05-20 20:51 ` New package: insomnia-2021.2.1 kedodrill
2021-05-20 20:51 ` [PR PATCH] [Closed]: " kedodrill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).