Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] support for AuroraServices #123

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions apks/auroraservices/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# SPDX-FileCopyrightText: 2020 Daniel Fullmer and robotnix contributors
# SPDX-License-Identifier: MIT

{ callPackage
, stdenv
, substituteAll
, fetchFromGitLab
, androidPkgs
, jdk11_headless
, gradle
, gradleToNixPatchedFetchers
}:
let
androidsdk = androidPkgs.sdk (p: with p; [ cmdline-tools-latest platforms-android-29 build-tools-28-0-3 ]);
buildGradle = callPackage ./gradle-env.nix { };
in
buildGradle rec {
name = "AuroraServices_v${version}.apk";
version = "1.1.1";
#https://gitlab.com/AuroraOSS/AuroraServices/uploads/c22e95975571e9db143567690777a56e/

envSpec = ./gradle-env.json;

src = fetchFromGitLab {
owner = "AuroraOSS";
repo = "AuroraServices";
rev = "1.1.1";
sha256 = "cYaviNIcZ03tsqLZwxSb85r04KAG6rirDL8xWFLo2ms=";
};

postPatch = ''
substituteInPlace app/build.gradle --replace "getVersionName()" "\"${version}\""
'';

# Lenient dependency verification needed so we can patch aapt2. Its hash is verifid by nix anyway
gradleFlags = [ "-Dorg.gradle.dependency.verification=lenient" "assembleRelease" ];

ANDROID_HOME = "${androidsdk}/share/android-sdk";

# With jdk16 in nixpkgs, gradle2nix w/ gradle 6.8.1 fails with "Unsupported class file major version 60"
# https://github.com/gradle/gradle/issues/14273
nativeBuildInputs = [ jdk11_headless ];

installPhase = ''
cp app/build/outputs/apk/full/release/app-full-release-unsigned.apk $out
'';

#fetchers = gradleToNixPatchedFetchers;
}
Loading