anbox-playstore-installer
anbox-playstore-installer copied to clipboard
More portable scripts (specifically, NixOS support).
In order for the scripts to run at all on as many systems as possible, this is ideal:
-#!/bin/bash
+#!/usr/bin/env bash
The only other hurdle I hit trying to get it to work on NixOS was that /var/lib/anbox/android.img
was missing, the NixOS service uses --android-image
to specify its path, so there's no need for a copy of it to exist in /var/lib
.
Something like this seems to work: sudo ln -s $(systemctl show anbox-container-manager.service -P ExecStart | grep ' --android-image=' | sed 's/^.* --android-image=//;s/;.*//;s/ --.*//') /var/lib/anbox/android.img
But I doubt that's the cleanest way to extract the value of --android-image
from the systemd unit file.
In any case, neither of these is specific to NixOS, and I wanted to leave this note here in case I don't get around making a PR (which would be easy for the shebang thing, but it's less obvious how to handle the --android-image
).