40 lines
1.3 KiB
Nix
40 lines
1.3 KiB
Nix
{
|
|
description = "Cryptomator";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
android-nixpkgs = {
|
|
url = "github:tadfisher/android-nixpkgs/stable";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, android-nixpkgs, nixpkgs, flake-utils }:
|
|
flake-utils.lib.eachDefaultSystem
|
|
(system:
|
|
let pkgs = import nixpkgs {
|
|
inherit system;
|
|
config = { android_sdk.accept_license = true; allowUnfree = true; };
|
|
}; in rec {
|
|
packages.android-sdk = android-nixpkgs.sdk.${system} (sdkPkgs: with sdkPkgs; [
|
|
cmdline-tools-latest
|
|
build-tools-30-0-3
|
|
build-tools-32-0-0
|
|
platform-tools
|
|
platforms-android-30
|
|
platforms-android-31
|
|
emulator
|
|
patcher-v4
|
|
]);
|
|
devShells.default = pkgs.mkShell {
|
|
packages = [ packages.android-sdk pkgs.jdk11 pkgs.gradle ];
|
|
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${packages.android-sdk}/share/android-sdk/build-tools/32.0.0/aapt2";
|
|
shellHook = ''
|
|
export PATH=${packages.android-sdk}/share/android-sdk/build-tools/32.0.0:$PATH
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
}
|