Usage
expelledboy opened this issue · 3 comments
Hey man, I am trying to figure out how to use this pkg, would you say this is a minimal working config?
{ config, lib, pkgs, ... }:
with lib;
let
packages = sdk: with sdk; [
tools
];
android-sdk = (import <android> {}).sdk (p: packages p.stable);
in {
config = (mkMerge [
({
home.packages = with pkgs; [
android-sdk
];
xdg.dataFile."android".source = "${android-sdk}/share/android-sdk";
})
]);
}
I am installing it through home-manager through nix-os, and getting the follow error:
--- home/anthony ‹master* M?› » TERM=xterm darwin-rebuild switch
building the system configuration...
error: i686 Linux package set can only be used with the x86 family.
(use '--show-trace' to show detailed location information)
Also I assumed based on your repo that this worked on Darwin?
Thanks for trying this out! I'll find some time to add some instructions to the README.
I think your config should work; the way I normally use it is like in sample.nix
:
let
android-sdk = (import <android> {}).sdk;
in sdk (p: with p.stable; [
tools
build-tools-29-0-0
platform-tools
platforms.android-29
emulator
system-images.android-29.google-apis-playstore.x86
])
It looks like there are some hardcoded i686-linux
buildInputs for the tools
derivation, so I'll have to include those for Linux only for this to build on Darwin. I'll borrow a Mac and try to get this working soon.
Awesome thanks! Ya I am not familiar with how android sdk works to start with.. difficult to debug when I am trying to get nix work on darwin as well 😵
If want I can open a tmate session to my laptop?
FYI, Darwin support was added a while back. Feel free to reopen if you have questions!