diff --git a/.gitignore b/.gitignore index 50dfd81..88d9f7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ /target +.flatpak +.flatpak-builder result result-* *.key diff --git a/README.md b/README.md index 6aa852f..afa3be6 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,18 @@ The tests run offline against an in-memory store: seed and key parsing, a sealed ## Status Work in progress: the UI is unexercised against a live server — the store, crypto and address paths are covered by tests, the network flows (register, fetch, send, rotate) are wired to fumi-core's operations but only smoke-tested as far as launching the window. + +## Packaging + +`devbox run package` builds and installs the app as a Flatpak from +`com.randogoth.carrier.json` — the binary, the desktop file, the metainfo and +the icon all come from the repo, and the tooling (`flatpak`, `flatpak-builder`, +`appstreamcli`) lives in the devbox environment. The flatpak runtime is the one +dependency outside devbox; install it once: + + flatpak install --user flathub org.gnome.Sdk//51 org.freedesktop.Sdk.Extension.rust-stable//26.08 + +The result is installed into the user flatpak and runs as +`flatpak run com.randogoth.carrier`. Inside the sandbox the app keeps its +config under `~/.var/app/com.randogoth.carrier/config/carrier`, so a flatpak +install starts with a fresh identity rather than the dev build's account. diff --git a/com.randogoth.carrier.json b/com.randogoth.carrier.json new file mode 100644 index 0000000..0006ab6 --- /dev/null +++ b/com.randogoth.carrier.json @@ -0,0 +1,69 @@ +{ + "id": "com.randogoth.carrier", + "runtime": "org.gnome.Platform", + "runtime-version": "51", + "sdk": "org.gnome.Sdk", + "command": "carrier", + "finish-args": [ + "--socket=wayland", + "--socket=fallback-x11", + "--device=dri", + "--share=network" + ], + "add-extensions": { + "org.freedesktop.Sdk.Extension.rust-stable": { + "directory": "/usr/lib/sdk/rust-stable", + "version": "stable", + "bundle": false, + "autodelete": false, + "disable-filesystem": true + } + }, + "build-options": { + "append-path": "/usr/lib/sdk/rust-stable/bin", + "build-args": [ + "--share=network" + ] + }, + "cleanup": [ + "/share/doc" + ], + "modules": [ + { + "name": "carrier", + "buildsystem": "simple", + "build-commands": [ + "sed -i 's|../fumi/core|fumi/core|' Cargo.toml", + "cargo build --release --locked", + "install -Dm755 target/release/carrier /app/bin/carrier", + "install -Dm644 data/com.randogoth.carrier.desktop /app/share/applications/com.randogoth.carrier.desktop", + "install -Dm644 data/com.randogoth.carrier.metainfo.xml /app/share/metainfo/com.randogoth.carrier.metainfo.xml", + "install -Dm644 data/icons/com.randogoth.carrier.png /app/share/icons/hicolor/512x512/apps/com.randogoth.carrier.png", + "install -Dm644 data/icons/com.randogoth.carrier-256.png /app/share/icons/hicolor/256x256/apps/com.randogoth.carrier.png", + "install -Dm644 data/icons/com.randogoth.carrier-128.png /app/share/icons/hicolor/128x128/apps/com.randogoth.carrier.png" + ], + "sources": [ + { + "type": "dir", + "path": ".", + "skip": [ + "target", + ".git", + ".jj", + ".flatpak" + ] + }, + { + "type": "dir", + "path": "../fumi", + "dest": "fumi", + "skip": [ + ".jj", + ".git", + "target" + ] + } + ] + } + ] +} diff --git a/data/com.randogoth.carrier.desktop b/data/com.randogoth.carrier.desktop new file mode 100644 index 0000000..ca96261 --- /dev/null +++ b/data/com.randogoth.carrier.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=carrier +Comment=Minimalist smolmail client +Exec=carrier +Icon=com.randogoth.carrier +Terminal=false +Type=Application +Categories=Network;Email; +Keywords=mail;smolmail;fumi; +X-Purism-FormFactor=Workstation;Mobile; diff --git a/data/com.randogoth.carrier.metainfo.xml b/data/com.randogoth.carrier.metainfo.xml new file mode 100644 index 0000000..1ccb0e1 --- /dev/null +++ b/data/com.randogoth.carrier.metainfo.xml @@ -0,0 +1,20 @@ + + + com.randogoth.carrier + carrier + Minimalist smolmail client + CC0-1.0 + Apache-2.0 + +

carrier is a minimalist desktop client for Smol Mail: one compact + window — the list above, the article below — built on fumi-core, the + reference CLI's own library, with a Relm4 (GTK4) UI made from + libadwaita's own widgets. One 32-byte seed is the only secret; mail + stays sealed at rest and opens on demand.

+
+ com.randogoth.carrier.desktop + + + + +
diff --git a/data/icons/com.randogoth.carrier-128.png b/data/icons/com.randogoth.carrier-128.png new file mode 100644 index 0000000..4f63fe2 Binary files /dev/null and b/data/icons/com.randogoth.carrier-128.png differ diff --git a/data/icons/com.randogoth.carrier-256.png b/data/icons/com.randogoth.carrier-256.png new file mode 100644 index 0000000..bd01870 Binary files /dev/null and b/data/icons/com.randogoth.carrier-256.png differ diff --git a/data/icons/com.randogoth.carrier.png b/data/icons/com.randogoth.carrier.png new file mode 100644 index 0000000..63dab32 Binary files /dev/null and b/data/icons/com.randogoth.carrier.png differ diff --git a/devbox.json b/devbox.json index 5fc8e27..a517954 100644 --- a/devbox.json +++ b/devbox.json @@ -19,7 +19,10 @@ "nixpkgs#gdk-pixbuf", "nixpkgs#harfbuzz", "nixpkgs#libadwaita", - "nixpkgs#adwaita-icon-theme" + "nixpkgs#adwaita-icon-theme", + "nixpkgs#flatpak", + "nixpkgs#flatpak-builder", + "nixpkgs#appstream" ], "shell": { "init_hook": [ @@ -40,6 +43,9 @@ ], "check": [ "cargo fmt --check && cargo build && cargo test" + ], + "package": [ + "flatpak-builder --force-clean --user --install-deps-from=flathub --install .flatpak com.randogoth.carrier.json" ] } } diff --git a/devbox.lock b/devbox.lock index da92544..a6f3109 100644 --- a/devbox.lock +++ b/devbox.lock @@ -47,10 +47,22 @@ "last_modified": "1970-01-01T00:00:00Z", "resolved": "path:/nix/store/v8ynlbrldn7k8byb1kx0j0wka8dsbrw9-source?narHash=sha256-BZWCi9ZRJiARTuKTbbtvFTj7t1TK4G3UEckT3HyNfRg%3D#adwaita-icon-theme" }, + "nixpkgs#appstream": { + "last_modified": "1970-01-01T00:00:00Z", + "resolved": "path:/nix/store/v8ynlbrldn7k8byb1kx0j0wka8dsbrw9-source?narHash=sha256-BZWCi9ZRJiARTuKTbbtvFTj7t1TK4G3UEckT3HyNfRg%3D#appstream" + }, "nixpkgs#cairo": { "last_modified": "1970-01-01T00:00:00Z", "resolved": "path:/nix/store/v8ynlbrldn7k8byb1kx0j0wka8dsbrw9-source?narHash=sha256-BZWCi9ZRJiARTuKTbbtvFTj7t1TK4G3UEckT3HyNfRg%3D#cairo" }, + "nixpkgs#flatpak": { + "last_modified": "1970-01-01T00:00:00Z", + "resolved": "path:/nix/store/v8ynlbrldn7k8byb1kx0j0wka8dsbrw9-source?narHash=sha256-BZWCi9ZRJiARTuKTbbtvFTj7t1TK4G3UEckT3HyNfRg%3D#flatpak" + }, + "nixpkgs#flatpak-builder": { + "last_modified": "1970-01-01T00:00:00Z", + "resolved": "path:/nix/store/v8ynlbrldn7k8byb1kx0j0wka8dsbrw9-source?narHash=sha256-BZWCi9ZRJiARTuKTbbtvFTj7t1TK4G3UEckT3HyNfRg%3D#flatpak-builder" + }, "nixpkgs#gcc": { "last_modified": "1970-01-01T00:00:00Z", "resolved": "path:/nix/store/v8ynlbrldn7k8byb1kx0j0wka8dsbrw9-source?narHash=sha256-BZWCi9ZRJiARTuKTbbtvFTj7t1TK4G3UEckT3HyNfRg%3D#gcc" diff --git a/smolmail.png b/smolmail.png deleted file mode 100644 index b076ec7..0000000 Binary files a/smolmail.png and /dev/null differ