mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-18 14:59:42 +02:00
- Rewrite Flatpak manifest to build from source using SDK extensions (node22, rust-stable) with offline cargo/npm dependency caches - Add generate-sources.sh to produce cargo-sources.json and node-sources.json from lock files using flatpak-builder-tools - Vendor Node.js, protoc, and wasm-pack as archive sources with SHA256 verification and per-arch support - Add SHA256 verification to vendor-node.cjs and vendor-protoc.cjs - Rewrite update-manifest.sh to update git tag/commit and regenerate dependency sources - Update Flathub CI workflow to install generators and copy source files - Remove stale plugins/faker entry from package-lock.json
170 lines
5.8 KiB
YAML
170 lines
5.8 KiB
YAML
id: app.yaak.Yaak
|
|
runtime: org.gnome.Platform
|
|
runtime-version: "49"
|
|
sdk: org.gnome.Sdk
|
|
command: yaak
|
|
|
|
sdk-extensions:
|
|
- org.freedesktop.Sdk.Extension.node22
|
|
- org.freedesktop.Sdk.Extension.rust-stable
|
|
|
|
rename-desktop-file: yaak.desktop
|
|
rename-icon: yaak-app
|
|
|
|
finish-args:
|
|
- --socket=wayland
|
|
- --socket=fallback-x11
|
|
- --share=ipc
|
|
- --device=dri
|
|
- --share=network
|
|
- --socket=pulseaudio # Preview audio responses
|
|
- --socket=ssh-auth # Git SSH remotes
|
|
- --socket=gpg-agent # Git commit signing
|
|
- --talk-name=org.freedesktop.secrets # Keyring for encryption
|
|
- --filesystem=home # Git repos, ~/.gitconfig, ~/.ssh, etc
|
|
|
|
modules:
|
|
- name: git
|
|
cleanup:
|
|
- /share
|
|
make-args:
|
|
- NO_PERL=1
|
|
- NO_TCLTK=1
|
|
make-install-args:
|
|
- INSTALL_SYMLINKS=1
|
|
- NO_PERL=1
|
|
- NO_TCLTK=1
|
|
sources:
|
|
- type: archive
|
|
url: https://www.kernel.org/pub/software/scm/git/git-2.48.1.tar.gz
|
|
sha256: 51b4d03b1e311ba673591210f94f24a4c5781453e1eb188822e3d9cdc04c2212
|
|
|
|
- name: yaak
|
|
buildsystem: simple
|
|
build-options:
|
|
append-path: /app/bin:/usr/lib/sdk/node22/bin:/usr/lib/sdk/rust-stable/bin
|
|
env:
|
|
CARGO_HOME: /run/build/yaak/cargo
|
|
XDG_CACHE_HOME: /run/build/yaak/flatpak-node/cache
|
|
npm_config_cache: /run/build/yaak/flatpak-node/npm-cache
|
|
npm_config_offline: "true"
|
|
npm_config_nodedir: /usr/lib/sdk/node22
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
|
|
|
build-commands:
|
|
# Vendor Node.js binary (sidecar for plugin runtime)
|
|
- mkdir -p crates-tauri/yaak-app/vendored/node
|
|
- install -Dm755 vendored-node/bin/node crates-tauri/yaak-app/vendored/node/yaaknode
|
|
|
|
# Vendor protoc binary and includes
|
|
- mkdir -p crates-tauri/yaak-app/vendored/protoc
|
|
- install -Dm755 protoc-bin/bin/protoc crates-tauri/yaak-app/vendored/protoc/yaakprotoc
|
|
- cp -r protoc-bin/include crates-tauri/yaak-app/vendored/protoc/include
|
|
|
|
# Install wasm-pack (needed for yaak-templates WASM build)
|
|
- install -Dm755 vendored-wasm-pack/wasm-pack /app/bin/wasm-pack
|
|
|
|
# Install npm dependencies offline
|
|
- npm ci --offline
|
|
|
|
# Pre-fetch Cargo dependencies offline
|
|
- cargo --offline fetch --manifest-path Cargo.toml
|
|
|
|
# Build all workspace packages (frontend, plugins, wasm, plugin-runtime)
|
|
- npm run build
|
|
|
|
# Copy built plugins to vendored directory
|
|
- npm run vendor:vendor-plugins
|
|
|
|
# Build the Tauri app (Rust backend + bundle as deb for icon/desktop extraction)
|
|
# Override beforeBuildCommand since we already built the frontend and dependencies above
|
|
- >-
|
|
npx tauri build -b deb
|
|
--config crates-tauri/yaak-app/tauri.linux.conf.json
|
|
--config '{"build":{"beforeBuildCommand":""}}'
|
|
|
|
# Install binary
|
|
- install -Dm755 crates-tauri/yaak-app/target/release/yaak /app/bin/yaak-app
|
|
|
|
# Install icons from the deb bundle
|
|
- cp -r crates-tauri/yaak-app/target/release/bundle/deb/*/data/usr/share/icons /app/share/icons
|
|
|
|
# Install desktop file
|
|
- install -Dm644 crates-tauri/yaak-app/target/release/bundle/deb/*/data/usr/share/applications/yaak.desktop /app/share/applications/yaak.desktop
|
|
|
|
# Install metainfo and license
|
|
- install -Dm644 flatpak/app.yaak.Yaak.metainfo.xml /app/share/metainfo/app.yaak.Yaak.metainfo.xml
|
|
- install -Dm644 LICENSE /app/share/licenses/app.yaak.Yaak/LICENSE
|
|
|
|
sources:
|
|
# Application source
|
|
- type: git
|
|
url: https://github.com/mountain-loop/yaak.git
|
|
tag: v2026.1.2
|
|
commit: bd7e840a5700ddefb5ef1f22771cc5555000f777
|
|
x-checker-data:
|
|
type: git
|
|
tag-pattern: ^v(\d+\.\d+\.\d+)$
|
|
|
|
# Offline npm dependencies
|
|
- node-sources.json
|
|
|
|
# Offline Cargo dependencies
|
|
- cargo-sources.json
|
|
|
|
# Vendored Node.js binary (x86_64)
|
|
- type: archive
|
|
url: https://nodejs.org/download/release/v24.11.1/node-v24.11.1-linux-x64.tar.gz
|
|
sha256: 58a5ff5cc8f2200e458bea22e329d5c1994aa1b111d499ca46ec2411d58239ca
|
|
strip-components: 1
|
|
dest: vendored-node
|
|
only-arches:
|
|
- x86_64
|
|
|
|
# Vendored Node.js binary (aarch64)
|
|
- type: archive
|
|
url: https://nodejs.org/download/release/v24.11.1/node-v24.11.1-linux-arm64.tar.gz
|
|
sha256: 0dc93ec5c798b0d347f068db6d205d03dea9a71765e6a53922b682b91265d71f
|
|
strip-components: 1
|
|
dest: vendored-node
|
|
only-arches:
|
|
- aarch64
|
|
|
|
# wasm-pack binary (x86_64)
|
|
- type: archive
|
|
url: https://github.com/drager/wasm-pack/releases/download/v0.13.1/wasm-pack-v0.13.1-x86_64-unknown-linux-musl.tar.gz
|
|
sha256: c539d91ccab2591a7e975bcf82c82e1911b03335c80aa83d67ad25ed2ad06539
|
|
strip-components: 1
|
|
dest: vendored-wasm-pack
|
|
only-arches:
|
|
- x86_64
|
|
|
|
# wasm-pack binary (aarch64)
|
|
- type: archive
|
|
url: https://github.com/drager/wasm-pack/releases/download/v0.13.1/wasm-pack-v0.13.1-aarch64-unknown-linux-musl.tar.gz
|
|
sha256: 2e65038769f8bbaa5fc237ad4bb523e692df99458cbd3e3d92525b89d8762379
|
|
strip-components: 1
|
|
dest: vendored-wasm-pack
|
|
only-arches:
|
|
- aarch64
|
|
|
|
# Vendored protoc binary and includes (x86_64)
|
|
- type: archive
|
|
url: https://github.com/protocolbuffers/protobuf/releases/download/v33.1/protoc-33.1-linux-x86_64.zip
|
|
sha256: f3340e28a83d1c637d8bafdeed92b9f7db6a384c26bca880a6e5217b40a4328b
|
|
dest: protoc-bin
|
|
only-arches:
|
|
- x86_64
|
|
|
|
# Vendored protoc binary and includes (aarch64)
|
|
- type: archive
|
|
url: https://github.com/protocolbuffers/protobuf/releases/download/v33.1/protoc-33.1-linux-aarch_64.zip
|
|
sha256: 6018147740548e0e0f764408c87f4cd040e6e1c1203e13aeacaf811892b604f3
|
|
dest: protoc-bin
|
|
only-arches:
|
|
- aarch64
|
|
|
|
# License file
|
|
- type: file
|
|
path: ../LICENSE
|