Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 16 additions & 17 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
description = "Flutter 3.27.x";
description = "Flutter 3.19.x environment with Android SDK";

inputs = {
nixpkgs.url = "nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
Expand All @@ -14,34 +16,31 @@
allowUnfree = true;
};
};

androidPkgs = (pkgs.androidenv.composeAndroidPackages {
platformVersions = [ "27" "29" "31" "33" "34" ];
buildToolsVersions = [ "30.0.3" ];
includeEmulator = true;
includeSystemImages = true;
});
# TODO: graphics are a bit weird

emulator = pkgs.androidenv.emulateApp {
name = "flutter_emu";
platformVersion = "27";
abiVersion = "x86"; # armeabi-v7a, mips, x86_64
abiVersion = "x86";
systemImageType = "google_apis_playstore";
deviceName = "pixel";
};
in
{
# run once:
# avdmanager create avd -n flutter_emulator -k 'system-images;android-27;google_apis_playstore;x86' -d pixel
# flutter emulators --launch flutter_emulator
# flutter pub run build_runner build --delete-conflicting-outputs

in {
devShells.default = pkgs.mkShell {
ANDROID_SDK_ROOT = "${androidPkgs.androidsdk}/libexec/android-sdk";
buildInputs = [
pkgs.flutter319
pkgs.jdk17
androidPkgs.androidsdk
emulator # execute emulator with: run-test-emulator
];
};
ANDROID_SDK_ROOT = "${androidPkgs.androidsdk}/libexec/android-sdk";
buildInputs = [
pkgs.flutter
pkgs.jdk17
androidPkgs.androidsdk
emulator
];
};
});
}
Loading