-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathrest.insomnia.Insomnia.yml
81 lines (81 loc) · 3.35 KB
/
rest.insomnia.Insomnia.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
app-id: rest.insomnia.Insomnia
runtime: org.freedesktop.Platform
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
base: org.electronjs.Electron2.BaseApp
base-version: '23.08'
separate-locales: false
command: insomnia
sdk-extensions:
- org.freedesktop.Sdk.Extension.node20
build-options:
append-path: /usr/lib/sdk/node20/bin
finish-args:
- --socket=wayland
- --socket=fallback-x11
- --share=ipc
- --share=network
- --device=dri
- --env=ELECTRON_TRASH=gio
- --talk-name=org.freedesktop.Notifications
modules:
- name: insomnia
buildsystem: simple
subdir: main
build-options:
env:
XDG_CACHE_HOME: /run/build/insomnia/flatpak-node/cache
npm_config_cache: /run/build/insomnia/flatpak-node/npm-cache
npm_config_offline: 'true'
npm_config_node_libcurl_cpp_std: c++17
sources:
- type: file
path: rest.insomnia.Insomnia.metainfo.xml
- type: script
dest-filename: insomnia.sh
commands:
- export TMPDIR="$XDG_RUNTIME_DIR/app/$FLATPAK_ID"
- exec zypak-wrapper.sh /app/main/insomnia --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations
"$@"
- type: archive
url: https://github.com/Kong/insomnia/archive/refs/tags/[email protected]/insomnia-10.0.0.tar.gz
sha256: 7be41f45dddbfbf12365bfcba5ccc886347da8926114b00bd0d1852cf3282991
dest: main
x-checker-data:
type: json
url: https://api.github.com/repos/Kong/insomnia/releases
version-query: map(select(.prerelease == false)) | map(select(.tag_name
| startswith("core@"))) | first | .tag_name | sub("core@"; "")
timestamp-query: map(select(.prerelease == false)) | map(select(.tag_name
| startswith("core@"))) | first | .published_at
url-query: '"https://github.com/Kong/insomnia/archive/refs/tags/core@" +
$version + "/insomnia-" + $version + ".tar.gz"'
- type: git
url: https://github.com/jackkav/grpc-reflection-js
commit: e78663356c362d44e629cfa119d12b63ba615bc0
dest: grpc-reflection-js
- type: patch
paths:
- patches/sources.patch
options: [ '-d', 'main' ]
- grpc-reflection-js-generated-sources.json
- insomnia-generated-sources.json
build-commands:
- |
cd ../grpc-reflection-js
yarn config set yarn-offline-mirror "/run/build/insomnia/flatpak-node/yarn-mirror"
yarn install --offline --ignore-scripts
yarn run compile
- npm ci --offline --foreground-scripts --verbose
- jq '.desktopName="rest.insomnia.Insomnia"' <<<$(<packages/insomnia/package.json)
>packages/insomnia/package.json
- |
. ../flatpak-node/electron-builder-arch-args.sh
# this fails after generating desktop files and icons, but that's all we need
npm run app-package -- -- $ELECTRON_BUILDER_ARCH_ARGS --config.appId=$FLATPAK_ID --linux flatpak --dir || true
- cp -av packages/insomnia/dist/linux*unpacked /app/main
- cp -av packages/insomnia/dist/__flatpak-*/share /app
- sed -i -e 's|^Exec=.*$|Exec=/app/bin/insomnia %u|' /app/share/applications/$FLATPAK_ID.desktop
- install -Dm644 "$FLATPAK_BUILDER_BUILDDIR/rest.insomnia.Insomnia.metainfo.xml"
-t /app/share/metainfo/
- install -Dm755 "$FLATPAK_BUILDER_BUILDDIR/insomnia.sh" /app/bin/insomnia