hTox is a Tox client for Android, written in Haskell with Hatter on hs-toxcore.
src/: the app.Modelis the state, how events change it and what it asks of Tox,Networkthe Tox that does it and reports back,Filesthe files going to and from friends,Storewhat is kept between runs in SQLite (Tox gets only our secret key from it, and the schema moves on by migrations),Viewthe widgets of each screen,Appthe wiring between them and Hatter.Themehas the light and dark colours.Identicondraws keys as other Tox clients do, so that a friend looks the same in each, andQrCodeTox IDs, as PNGs fromPng.app/Main.hs: the entry point Hatter's Android build runs.platform/: the Android manifest, theme, icons, activity, and the foreground service that keeps Tox running while no screen is open.terminal/: hTox in a terminal, on Hatter's terminal platform, with the icons as characters.nix/: the Hatter pin, the Android builds, and the Haskell packages nixpkgs lacks. Hatter builds from the workspace'sthird_party/hatter, which has our changes to it, and hs-toxcore and its msgpack packages from their checkouts here.
Build the APK, for arm64 phones:
nix-build nix/apk.nix
adb install result/htox.apkEvery build is signed with nix/debug.keystore, so it installs over the last.
Run the tests on the desktop:
nix-shell --run 'cabal test'The first Android build compiles a cross GHC, which takes a while.
Run hTox in a terminal:
cd terminal
nix-shell --run 'cabal run htox'It keeps its chats in ~/.local/share/htox, encrypted with the key in
database.key there, and logs to log.txt there. Tab and the arrow keys move
between what can be tapped or typed in, Enter taps, Alt-Enter or a right click
holds, Esc goes back and Ctrl-Q quits. Calls, the camera and your location
aren't there.