mach: fix shell.nix to actually include android pkgs (#31279)

Fix issue with precedence due to which the android
environment variables were being added to the output
of mkDerivation instead of the input attribute set.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
Mukilan Thiyagarajan 2024-02-08 07:11:42 +05:30 committed by GitHub
parent 20404a72c0
commit 13ddac02e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,8 +53,14 @@ let
];
};
androidSdk = androidComposition.androidsdk;
# Required by ./mach build --android
androidEnvironment = lib.optionalAttrs buildAndroid rec {
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
ANDROID_NDK_ROOT = "${ANDROID_SDK_ROOT}/ndk-bundle";
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${ANDROID_SDK_ROOT}/build-tools/${buildToolsVersion}/aapt2";
};
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (androidEnvironment // rec {
name = "servo-env";
buildInputs = [
@ -214,9 +220,4 @@ stdenv.mkDerivation rec {
export RUSTUP_HOME=$repo_root/.rustup
fi
'';
} // lib.optionalAttrs buildAndroid {
# Required by ./mach build --android
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
ANDROID_NDK_ROOT = "${ANDROID_SDK_ROOT}/ndk-bundle";
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${ANDROID_SDK_ROOT}/build-tools/${buildToolsVersion}/aapt2";
}
})