-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathio.github.cosmic_utils.camera.yml
More file actions
163 lines (153 loc) · 7.17 KB
/
io.github.cosmic_utils.camera.yml
File metadata and controls
163 lines (153 loc) · 7.17 KB
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
app-id: io.github.cosmic_utils.camera
runtime: org.freedesktop.Platform
runtime-version: '25.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.rust-stable
- org.freedesktop.Sdk.Extension.llvm21
base: com.system76.Cosmic.BaseApp
base-version: stable
command: camera
finish-args:
# Wayland access
- --socket=wayland
# X11 Fallback
- --share=ipc
- --socket=fallback-x11
# Webcam access (currently no better option than this)
# https://docs.flatpak.org/en/latest/sandbox-permissions.html#device-access
# Automatically includes GPU support since "dri" is part of "all"
- --device=all
# Home directory access for saving photos/videos
- --filesystem=xdg-pictures:rw
- --filesystem=xdg-videos:rw
# flathub-linter: skip=finish-args-unnecessary-xdg-config-cosmic-rw-access
- --filesystem=xdg-config/cosmic:rw
# PipeWire access for camera and audio
- --filesystem=xdg-run/pipewire-0:ro
# PulseAudio access (PipeWire's PulseAudio compatibility layer for pulsesrc)
- --socket=pulseaudio
# udev access for libcamera device enumeration (reads device metadata)
- --filesystem=/run/udev:ro
# D-Bus access for COSMIC config daemon (live theme/config updates)
# The wildcard is needed because the settings daemon creates dynamic config proxy
# names like com.system76.CosmicSettingsDaemon.Config.com.system76.CosmicTheme.Dark.V1
- --talk-name=com.system76.CosmicSettingsDaemon
- --talk-name=com.system76.CosmicSettingsDaemon.*
# D-Bus access for "Show in Files" functionality
- --talk-name=org.freedesktop.FileManager1
# D-Bus access for WiFi connection from QR codes (system bus, not session bus)
- --system-talk-name=org.freedesktop.NetworkManager
modules:
# Python build dependencies required by libcamera's meson build.
# The Freedesktop SDK includes markupsafe but not jinja2/pyyaml, which
# libcamera needs for code generation during its meson configure step.
# flit_core is needed as the build backend for jinja2.
- name: python3-flit-core
buildsystem: simple
build-commands:
- pip3 install --no-build-isolation --prefix=${FLATPAK_DEST} .
sources:
- type: archive
url: https://files.pythonhosted.org/packages/69/59/b6fc2188dfc7ea4f936cd12b49d707f66a1cb7a1d2c16172963534db741b/flit_core-3.12.0.tar.gz
sha256: 18f63100d6f94385c6ed57a72073443e1a71a4acb4339491615d0f16d6ff01b2
- name: python3-jinja2
buildsystem: simple
build-commands:
- pip3 install --no-build-isolation --prefix=${FLATPAK_DEST} .
sources:
- type: archive
url: https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz
sha256: 0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d
- name: python3-pyyaml
buildsystem: simple
build-commands:
- pip3 install --no-build-isolation --prefix=${FLATPAK_DEST} .
sources:
- type: archive
url: https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz
sha256: d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f
- name: python3-ply
buildsystem: simple
build-commands:
- pip3 install --no-build-isolation --prefix=${FLATPAK_DEST} .
sources:
- type: archive
url: https://files.pythonhosted.org/packages/e5/69/882ee5c9d017149285cab114ebeab373308ef0f874fcdac9beb90e0ac4da/ply-3.11.tar.gz
sha256: 00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3
# nlohmann/json header-only library, needed by libpisp
- name: nlohmann-json
buildsystem: cmake-ninja
config-opts:
- -DJSON_BuildTests=OFF
sources:
- type: git
url: https://github.com/nlohmann/json.git
tag: v3.12.0
commit: 65ee68451d8eb2b5f3a30b410476ab83deb3289b
# libpisp is needed by libcamera's Raspberry Pi ISP pipeline handler
- name: libpisp
buildsystem: meson
sources:
- type: git
url: https://github.com/raspberrypi/libpisp.git
tag: v1.3.0
commit: 9ba67e6680f03f31f2b1741a53e8fd549be82cbe
# Build libcamera from source so the Rust crate can link against it via pkg-config.
- name: libcamera
buildsystem: meson
config-opts:
- -Dcam=disabled
- -Dqcam=disabled
- -Dgstreamer=disabled
- -Dtracing=disabled
- -Dpycamera=disabled
- -Dlc-compliance=disabled
- -Ddocumentation=disabled
- -Dtest=false
sources:
- type: git
url: https://git.libcamera.org/libcamera/libcamera.git
tag: v0.7.0
commit: b7854fd07d42168f099b5ce30d1702e0e0875bf5
- name: camera
buildsystem: simple
build-options:
append-path: /usr/lib/sdk/rust-stable/bin
env:
CARGO_HOME: /run/build/camera/cargo
CARGO_TARGET_DIR: /run/build/camera/target
LIBCLANG_PATH: /usr/lib/sdk/llvm21/lib
BINDGEN_EXTRA_CLANG_ARGS: -I/usr/lib/sdk/llvm21/lib/clang/21/include
# libcamera installs to lib64 on x86_64, but flatpak's default
# PKG_CONFIG_PATH only includes lib/pkgconfig
PKG_CONFIG_PATH: /app/lib64/pkgconfig:/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
build-commands:
# Build the application with cargo (version is passed via .flatpak-version file)
- |
if [ -f .flatpak-version ]; then
export CAMERA_VERSION=$(cat .flatpak-version)
fi
cargo --offline fetch --manifest-path Cargo.toml --verbose
cargo --offline build --release --verbose
# Install the binary
- install -Dm755 target/release/camera -t /app/bin/
# Install desktop file
- install -Dm644 resources/io.github.cosmic_utils.camera.desktop -t /app/share/applications/
# Install icons (PNG for each size, SVG for scalable)
- install -Dm644 resources/icons/hicolor/scalable/apps/io.github.cosmic_utils.camera.svg -t /app/share/icons/hicolor/scalable/apps/
- install -Dm644 resources/icons/hicolor/16x16/apps/io.github.cosmic_utils.camera.png -t /app/share/icons/hicolor/16x16/apps/
- install -Dm644 resources/icons/hicolor/24x24/apps/io.github.cosmic_utils.camera.png -t /app/share/icons/hicolor/24x24/apps/
- install -Dm644 resources/icons/hicolor/32x32/apps/io.github.cosmic_utils.camera.png -t /app/share/icons/hicolor/32x32/apps/
- install -Dm644 resources/icons/hicolor/48x48/apps/io.github.cosmic_utils.camera.png -t /app/share/icons/hicolor/48x48/apps/
- install -Dm644 resources/icons/hicolor/64x64/apps/io.github.cosmic_utils.camera.png -t /app/share/icons/hicolor/64x64/apps/
- install -Dm644 resources/icons/hicolor/128x128/apps/io.github.cosmic_utils.camera.png -t /app/share/icons/hicolor/128x128/apps/
- install -Dm644 resources/icons/hicolor/256x256/apps/io.github.cosmic_utils.camera.png -t /app/share/icons/hicolor/256x256/apps/
# Install metainfo
- install -Dm644 resources/io.github.cosmic_utils.camera.metainfo.xml -t /app/share/metainfo/
sources:
- type: dir
path: .
- cargo-sources.json
# Note: No additional GStreamer plugins needed - app uses pipewiresrc which is
# included in org.freedesktop.Platform via PipeWire's gst-plugin-pipewire