add android tools to damocles
This commit is contained in:
parent
1969d71a8c
commit
fbe9ce80d1
2 changed files with 53 additions and 0 deletions
43
nixosConfigurations/damocles/android-dev.nix
Normal file
43
nixosConfigurations/damocles/android-dev.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
androidComposition = pkgs.androidenv.composeAndroidPackages {
|
||||
buildToolsVersions = [ "36.1.0" ];
|
||||
platformVersions = [ "35" ];
|
||||
includeNDK = false;
|
||||
includeEmulator = false;
|
||||
includeSystemImages = false;
|
||||
};
|
||||
androidSdk = androidComposition.androidsdk;
|
||||
in
|
||||
{
|
||||
nixpkgs.config.android_sdk.accept_license = true;
|
||||
|
||||
allowedUnfreePackages = [
|
||||
"android-sdk-cmdline-tools"
|
||||
"android-sdk-platform-tools"
|
||||
"android-sdk-tools"
|
||||
"android-sdk-build-tools"
|
||||
"android-sdk-platforms"
|
||||
|
||||
# wtf
|
||||
"platform-tools"
|
||||
"tools"
|
||||
"build-tools"
|
||||
"cmdline-tools"
|
||||
"platforms"
|
||||
"cmake" # android sdk repackage
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
androidSdk
|
||||
gradle
|
||||
kotlin
|
||||
jdk21
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
ANDROID_HOME = "${androidSdk}/libexec/android-sdk";
|
||||
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
|
||||
JAVA_HOME = "${pkgs.jdk21}";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
{ pkgs, self, ... }:
|
||||
{
|
||||
imports = [ ./android-dev.nix ];
|
||||
|
||||
nixpkgs.overlays = [ self.overlays.unstable-packages ];
|
||||
|
||||
boot.isContainer = true;
|
||||
|
|
@ -21,4 +23,12 @@
|
|||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [
|
||||
stdenv.cc.cc.lib
|
||||
zlib
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue