diff --git a/README.md b/README.md index fc42169..b87e360 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,14 @@ A repository of derivations that builds as much open source android applications ## Directories +Available APK packages: + +- **mihon** (`apks/mi/mihon/`) - A free and open source manga reader for Android +- **smouldering_durtles** (`apks/sm/smouldering_durtles/`) - A third-party Android app for WaniKani +- **tailscale** (`apks/ta/tailscale/`) - Tailscale VPN client for Android (🚧 needs version/hash update) + +To build a package: `nix build .#` + ## Roadmap - Write custom derivation to compile Gradle based applications. diff --git a/apks/ta/tailscale/README.md b/apks/ta/tailscale/README.md index c35c3df..8293af6 100644 --- a/apks/ta/tailscale/README.md +++ b/apks/ta/tailscale/README.md @@ -13,6 +13,9 @@ This package builds the Tailscale Android application from source. 4. **Verify build output**: Check if the APK output path is correct (might be `app-universal-release-unsigned.apk`) 5. **Test build**: Run `nix build .#tailscale` to verify it builds successfully +### Quick Setup: +Run `./update-tailscale.sh` from the repository root to automatically update version and hash. + ## About Tailscale Tailscale is a VPN service that makes the devices and applications you own accessible anywhere in the world, securely and effortlessly. It enables encrypted point-to-point connections using the open source WireGuard protocol. diff --git a/update-tailscale.sh b/update-tailscale.sh new file mode 100755 index 0000000..59ee8e0 --- /dev/null +++ b/update-tailscale.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# Helper script to update Tailscale package with latest version and hash + +set -e + +echo "Fetching latest Tailscale Android release..." + +# Get latest release from GitHub API +LATEST_RELEASE=$(curl -s https://api.github.com/repos/tailscale/tailscale-android/releases/latest) +LATEST_VERSION=$(echo "$LATEST_RELEASE" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's/^v//') + +if [ -z "$LATEST_VERSION" ]; then + echo "Could not fetch latest version. Please check manually at:" + echo "https://github.com/tailscale/tailscale-android/releases" + exit 1 +fi + +echo "Latest version: $LATEST_VERSION" + +# Get the hash for the source +echo "Fetching source hash..." +HASH=$(nix-prefetch-url --unpack "https://github.com/tailscale/tailscale-android/archive/v${LATEST_VERSION}.tar.gz") + +if [ -z "$HASH" ]; then + echo "Could not fetch source hash." + exit 1 +fi + +echo "Hash: $HASH" + +# Update package.nix +sed -i "s/version = \"[^\"]*\"/version = \"$LATEST_VERSION\"/" apks/ta/tailscale/package.nix +sed -i "s/hash = \"[^\"]*\"/hash = \"sha256-$HASH\"/" apks/ta/tailscale/package.nix + +echo "Updated package.nix with version $LATEST_VERSION and hash $HASH" +echo "Now run: nix build .#tailscale" \ No newline at end of file