-
Notifications
You must be signed in to change notification settings - Fork 13
/
com.github.nwg_piotr.nwg-panel.yaml
133 lines (133 loc) · 5.4 KB
/
com.github.nwg_piotr.nwg-panel.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# TODO: use flatpak-spawn wrappers? light, pamixer, playerctl, wlr-randr
# TODO: add modules bluez(enable pybluez), pamixer
app-id: com.github.nwg_piotr.nwg-panel
runtime: org.freedesktop.Platform
runtime-version: '21.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.golang
command: nwg-panel
finish-args:
- --device=dri
# workaround for /dev/rfkill access
- --device=all
- --share=ipc
- --share=network
- --socket=pulseaudio
- --socket=session-bus
- --socket=system-bus
- --socket=wayland
# workaround for missing icon exports
# flatpak does not expand variables given to --env, so it's not possible to include in
# XDG_DATA_DIRS the icons exports from the user flatpak installation
# e.g. --env=XDG_DATA_DIRS=$XDG_DATA_HOME/flatpak/exports/share:...
# so a user override should be added, taking in account the content of XDG_DATA_DIRS below
# e.g. $ flatpak override --user --env=XDG_DATA_DIRS=$XDG_DATA_HOME/flatpak/exports/share:... com.github.alexays.waybar
# related bug reports:
# https://github.com/flatpak/flatpak/issues/1415
# https://github.com/flatpak/flatpak/issues/3800
- --filesystem=/var/lib/flatpak:ro
- --filesystem=xdg-data/flatpak:ro
- --env=XDG_DATA_DIRS=/var/lib/flatpak/exports/share:/app/share:/usr/share:/usr/share/runtime/share:/run/host/user-share:/run/host/share
# sway ipc socket workaround
# by default sway socket is ${XDG_RUNTIME_DIR}/sway-ipc.<uid>.<pid>.sock
# so we need to change this to a flatpak mount-able folder
# 1. export SWAYSOCK=$XDG_RUNTIME_DIR/sway/sway-ipc.sock
# 2. mkdir $XDG_RUNTIME_DIR/sway/sway-ipc.sock
# or use tmpfiles.d by creating ~/.config/user-tmpfiles.d/sway.conf
# with
# d %t/sway 0700 - - - -
# and enable systemd-tmpfiles-{clean.timer,setup.service}
# related bug reports:
# https://github.com/swaywm/sway/issues/5624
- --filesystem=xdg-run/sway
# give access to flatpak apps runtime dirs
# this can be a workaround for the system tray icon problem with QT when used with
# XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID
- --filesystem=xdg-run/app:ro
cleanup:
- /include
- /lib/pkgconfig
modules:
- name: nwg-panel
buildsystem: simple
build-commands:
- python setup.py build
- python setup.py install --skip-build --prefix=/app --root=/ --optimize=1
- install -Dm644 nwg-panel.svg /app/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg
- install -Dm644 nwg-panel-config.desktop /app/share/applications/${FLATPAK_ID}.desktop
- desktop-file-edit --set-icon=$FLATPAK_ID /app/share/applications/${FLATPAK_ID}.desktop
sources:
- type: archive
url: https://github.com/nwg-piotr/nwg-panel/archive/v0.4.3/nwg-panel-0.4.3.tar.gz
sha256: 656a2df9d3b39a183bde3d1ed5b136630bb27519126fa16491c041a86cc393b7
x-checker-data:
type: anitya
project-id: 190839
stable-only: true
url-template: https://github.com/nwg-piotr/nwg-panel/archive/v$version/nwg-panel-$version.tar.gz
- ../shared-modules/gtk-layer-shell/gtk-layer-shell.json
- ../shared-modules/python-gobject/python-gobject.json
# cycle dependncy of flit-core and tomli, so use this workaround module
- ../shared-modules/python-setuptools-scm/python-setuptools-scm.json
- python-dependencies.json
- name: light
config-opts:
- --without-udev
sources:
- type: archive
url: https://github.com/haikarainen/light/archive/v1.2.2/light-1.2.2.tar.gz
sha256: 62e889ee9be80fe808a972ef4981acc39e83a20f9a84a66a82cd1f623c868d9c
x-checker-data:
type: anitya
project-id: 16142
stable-only: true
url-template: https://github.com/haikarainen/light/archive/v$version/light-$version.tar.gz
- type: shell
commands:
- sed -i 's/\(light_CFLAGS.*=.*\)/\1 -fcommon/' src/Makefile.am
cleanup:
- /share
- name: playerctl
buildsystem: meson
sources:
- type: archive
url: https://github.com/altdesktop/playerctl/archive/v2.4.1.tar.gz
sha256: 75957ad5071956f563542c7557af16a57e40b4a7f66bc9b6373d022ec5eef548
x-checker-data:
type: anitya
project-id: 18550
stable-only: true
url-template: https://github.com/altdesktop/playerctl/archive/v$version.tar.gz
- name: wlr-randr
buildsystem: meson
sources:
- type: git
url: https://git.sr.ht/~emersion/wlr-randr
tag: v0.2.0
commit: ced1daa89e59ce5a0e42fd77148a8f614bcbc3f7
x-checker-data:
type: git
tag-pattern: ^v([\d.]+)$
- name: nwg-menu
# TODO: switch to offline/cached build
buildsystem: simple
build-options:
env:
- GOBIN=/app/bin
- GOROOT=/usr/lib/sdk/golang
- GOFLAGS=-modcacherw
- GOPATH=/run/build/nwg-menu/gopath
append-path: /usr/lib/sdk/golang/bin
build-args:
- --share=network
build-commands:
- sed -i 's#/usr/share#/app/share#g' {main,tools}.go
- go install
- install -Dm644 menu-start.css -t ${FLATPAK_DEST}/share/nwg-menu/
- install -Dm644 desktop-directories/* -t ${FLATPAK_DEST}/share/nwg-menu/desktop-directories/
sources:
- type: git
url: https://github.com/nwg-piotr/nwg-menu.git
branch: main
commit: 00e2fc92b7d6a7ff135cd3a83389e07250a6e827