{ description = "Flutter"; inputs = { nixpkgs-unstable.url = "github:NixOS/nixpkgs/master"; flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs-unstable, flake-utils, }: flake-utils.lib.eachDefaultSystem ( system: let pkgs = import nixpkgs-unstable { inherit system; config = { android_sdk.accept_license = true; allowUnfree = true; }; }; androidComposition = pkgs.androidenv.composeAndroidPackages { buildToolsVersions = [ "34.0.0" "33.0.1" ]; platformVersions = [ "28" "29" "30" "31" "32" "33" "34" ]; abiVersions = [ "armeabi-v7a" "arm64-v8a" ]; includeNDK = true; ndkVersions = [ "25.1.8937393" ]; }; # androidComposition = pkgs.androidenv.composeAndroidPackages { # toolsVersion = "26.1.1"; # platformToolsVersion = "34.0.5"; # buildToolsVersions = [ "30.0.3" ]; # includeEmulator = false; # emulatorVersion = "34.1.9"; # platformVersions = [ # "28" # "29" # "30" # "31" # "32" # "33" # "34" # ]; # includeSources = false; # includeSystemImages = false; # systemImageTypes = [ "google_apis_playstore" ]; # abiVersions = [ # "armeabi-v7a" # "arm64-v8a" # ]; # cmakeVersions = [ "3.10.2" ]; # includeNDK = true; # ndkVersions = [ "21.4.7075529" ]; # useGoogleAPIs = false; # useGoogleTVAddOns = false; # # buildToolsVersions = [ buildToolsVersion ]; # # platformVersions = [ # # "29" # # "30" # # "31" # # "32" # # "33" # # "34" # # "28" # # ]; # # abiVersions = [ # # "armeabi-v7a" # # "arm64-v8a" # # ]; # }; androidSdk = androidComposition.androidsdk; platformTools = androidComposition.platform-tools; in { devShell = with pkgs; mkShell rec { ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk"; # JAVA_HOME = pkgs.jdk17; buildInputs = [ flutter androidSdk # platformTools jdk17 # Needed by flutter_secure_storage libsecret.dev gtk3.dev pcre2.dev libsysprof-capture util-linux.dev libselinux.dev libsepol.dev libthai.dev libgcrypt.dev libdatrie.dev libgpg-error.dev xorg.libXdmcp.dev pkg-config ]; }; } ); }