Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions install-wear.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
# Install prrrrrrrrr on a Wear OS watch (armeabi-v7a / 32-bit ARM).
# Connect the watch via ADB (Wi-Fi or USB debugging) before running.

set -euo pipefail

adb uninstall me.jappie.prrrrrrrrr 2>/dev/null || true
adb install "$(nix-build nix/apk.nix --argstr androidArch armv7a)/prrrrrrrrr.apk"
3 changes: 2 additions & 1 deletion nix/android.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Android shared library — uses haskell-mobile's lib.nix.
{ sources ? import ../npins
, androidArch ? "aarch64"
, mainModule ? ../app/MobileMain.hs
}:
let
haskellMobileSrc = sources.haskell-mobile;
lib = import "${haskellMobileSrc}/nix/lib.nix" { inherit sources; };
lib = import "${haskellMobileSrc}/nix/lib.nix" { inherit sources androidArch; };
in
lib.mkAndroidLib {
inherit haskellMobileSrc mainModule;
Expand Down
9 changes: 5 additions & 4 deletions nix/apk.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# APK packaging — uses haskell-mobile's lib.nix.
{ sources ? import ../npins }:
{ sources ? import ../npins, androidArch ? "aarch64" }:
let
haskellMobileSrc = sources.haskell-mobile;
lib = import "${haskellMobileSrc}/nix/lib.nix" { inherit sources; };
sharedLib = import ./android.nix { inherit sources; };
abiDir = { aarch64 = "arm64-v8a"; armv7a = "armeabi-v7a"; }.${androidArch};
lib = import "${haskellMobileSrc}/nix/lib.nix" { inherit sources androidArch; };
sharedLib = import ./android.nix { inherit sources androidArch; };
in
lib.mkApk {
inherit sharedLib;
sharedLibs = [{ lib = sharedLib; inherit abiDir; }];
androidSrc = ../android;
apkName = "prrrrrrrrr.apk";
name = "prrrrrrrrr-apk";
Expand Down
6 changes: 3 additions & 3 deletions npins/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
},
"branch": "master",
"submodules": false,
"revision": "29d821c470163c29793e4068ec147883af57ec29",
"url": "https://github.com/jappeace/haskell-mobile/archive/29d821c470163c29793e4068ec147883af57ec29.tar.gz",
"hash": "sha256-umDNrUFu9/euQ5bq4OzwOYyuvTXfvNAAVg5nO7lF7gM="
"revision": "93516d40ed92695a1e8cbfc9711f60a9c1bb54ed",
"url": "https://github.com/jappeace/haskell-mobile/archive/93516d40ed92695a1e8cbfc9711f60a9c1bb54ed.tar.gz",
"hash": "sha256-lqg6cUatXNJdjYKhpvmwajlhVne2jVdr4ShT0slT+OI="
},
"nixpkgs": {
"type": "Channel",
Expand Down
Loading