-
-
Notifications
You must be signed in to change notification settings - Fork 422
/
engineer.atlas.Nyxt-Electron.yaml
108 lines (97 loc) · 3.43 KB
/
engineer.atlas.Nyxt-Electron.yaml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
app-id: engineer.atlas.Nyxt-Electron
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.node20
base: org.electronjs.Electron2.BaseApp
base-version: '24.08'
rename-icon: nyxt
rename-appdata-file: nyxt.metainfo.xml
rename-desktop-file: nyxt.desktop
command: nyxt
build-options:
append-path: /usr/lib/sdk/node20/bin
finish-args:
- --device=dri
- --share=network
- --share=ipc
- --socket=x11
- --socket=pulseaudio
- --socket=cups
- --filesystem=host
# Allow invoking host commands via flatpak-spawn --host <command> <command-args>
- --talk-name=org.freedesktop.Flatpak
# See http://sbcl.org/getting.html
- --env=SBCL_HOME=/app/lib/sbcl
modules:
- name: sbcl
buildsystem: simple
sources:
- type: archive
url: http://prdownloads.sourceforge.net/sbcl/sbcl-2.4.10-x86-64-linux-binary.tar.bz2
sha256: 99cc019120172bb4317f3c79cfc3afffe51e314091e07e8c0ba1d94759767777
only-arches: [x86_64]
build-commands:
- INSTALL_ROOT=${FLATPAK_DEST} sh install.sh
- name: xsel
buildsystem: autotools
sources:
- type: git
url: https://github.com/kfish/xsel.git
tag: 1.2.1
- name: wl-clipboard
buildsystem: meson
config-opts:
- -Dzshcompletiondir=no
- -Dfishcompletiondir=no
sources:
- type: git
url: https://github.com/bugaevc/wl-clipboard.git
tag: v2.2.1
- name: libfixposix
buildsystem: autotools
sources:
- type: git
url: https://github.com/sionescu/libfixposix.git
tag: v0.5.1
- type: script
dest-filename: autogen.sh
commands:
- autoreconf -fi
cleanup:
- /lib/pkgconfig
- /include
- '*.h'
- '*.pc'
- '*.la'
- name: nyxt
buildsystem: simple
build-options:
env:
XDG_CACHE_HOME: /run/build/nyxt/flatpak-node/cache
npm_config_cache: /run/build/nyxt/flatpak-node/npm-cache
npm_config_nodedir: /run/build/nyxt/flatpak-node/cache/node-gyp/32.2.5
build-commands:
# Have node available at runtime
- /usr/lib/sdk/node20/install-sdk.sh
- mkdir -p ${FLATPAK_DEST}/bin
- ln -s ${FLATPAK_DEST}/node/bin/node ${FLATPAK_DEST}/bin/node
- ln -s ${FLATPAK_DEST}/node/bin/npm ${FLATPAK_DEST}/bin/npm
# Install cl-electron-server
- cp _build/cl-electron/package.json _build/cl-electron/package-lock.json _build/cl-electron/source/server.js ${FLATPAK_DEST}
- npm install --offline --verbose --prefix ${FLATPAK_DEST}
# Patch cl-electron
- sed -i "s|(uiop:xdg-runtime-dir \"cl-electron/\")|(uiop:xdg-runtime-dir \"app/$FLATPAK_ID/cl-electron/\")|" _build/cl-electron/source/core.lisp
- sed -i "s|(asdf:system-relative-pathname :cl-electron \"source/server.js\")|#P\"$FLATPAK_DEST/server.js\"|" _build/cl-electron/source/core.lisp
- sed -i "s|(asdf:system-source-directory :cl-electron)|#P\"$FLATPAK_DEST\"|" _build/cl-electron/source/core.lisp
# Compile Nyxt
- make install NYXT_RENDERER=electron NODE_SETUP=false DESTDIR=${FLATPAK_DEST} PREFIX=
# Fix sandbox
- sed -i "s|\"electron\",|\"zypak-wrapper /app/node_modules/electron/dist/electron\",|" ${FLATPAK_DEST}/package.json
sources:
- type: dir
path: .
# Generated via:
# flatpak-node-generator --electron-node-headers npm _build/cl-electron/package-lock.json
- generated-sources.json