forked from SEbbaDK/maptogether
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
27 lines (26 loc) · 828 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ pkgs ? import ../nixpkgs.nix { config.android_sdk.accept_license = true; }
, includeAndroid ? true
, ...
}:
let
btv = "29.0.2";
android = pkgs.androidenv.composeAndroidPackages {
buildToolsVersions = [ btv ];
platformVersions = [ "30" ];
};
sdk = "${android.androidsdk}";
pubspec = builtins.readFile ./pubspec.yaml;
version = builtins.head (builtins.match ".*version: ([0-9.]+).*" pubspec);
in
pkgs.stdenv.mkDerivation
{
name = "maptogether-client";
inherit version;
buildInputs = with pkgs; [
jdk11
flutter
];
ANDROID_SDK_ROOT = (if includeAndroid then "${sdk}/libexec/android-sdk" else "");
# This used to be be necessary, but now it seems to break builds
# GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${sdk}/libexec/android-sdk/build-tools/${btv}/aapt2";
}