2024-09-05 16:57:52 +02:00
|
|
|
{ sources ? import ../npins, pkgs ? import sources.nixpkgs {}, lib ? pkgs.lib, android ? import sources.android {} }:
|
|
|
|
let
|
2024-09-18 15:05:28 +02:00
|
|
|
apt2-version = "7.4.2-8841542";
|
|
|
|
aapt2 = (pkgs.callPackage "${sources.android}/pkgs/aapt2" { }).overrideAttrs (final: old: {
|
|
|
|
name = "aapt2-${apt2-version}";
|
|
|
|
|
|
|
|
src = pkgs.fetchurl {
|
|
|
|
url = "https://maven.google.com/com/android/tools/build/aapt2/${apt2-version}/aapt2-${apt2-version}-linux.jar";
|
|
|
|
sha256 = "sha256-bHKE8i7QbE0UFgn1TW4gzPj7MBV7t/PVo+Txd6jW0wE=";
|
|
|
|
};
|
|
|
|
});
|
2024-09-05 16:57:52 +02:00
|
|
|
androidSdk = android.sdk (sdkPkgs: with sdkPkgs; [
|
|
|
|
cmdline-tools-latest
|
|
|
|
build-tools-30-0-3
|
|
|
|
platform-tools
|
|
|
|
platforms-android-30
|
|
|
|
emulator
|
|
|
|
]);
|
|
|
|
|
|
|
|
in lib.makeScope pkgs.newScope (self: with self; {
|
2024-09-18 15:05:28 +02:00
|
|
|
inherit androidSdk aapt2;
|
2024-09-05 16:57:52 +02:00
|
|
|
|
|
|
|
gradle = pkgs.gradle_7;
|
|
|
|
|
|
|
|
updateLocks = callPackage ./update-locks.nix { };
|
|
|
|
|
|
|
|
buildMavenRepo = callPackage ./maven-repo.nix { };
|
|
|
|
|
|
|
|
mavenRepo = buildMavenRepo {
|
|
|
|
name = "nix-maven-repo";
|
|
|
|
repos = [
|
|
|
|
"https://dl.google.com/dl/android/maven2"
|
|
|
|
"https://repo1.maven.org/maven2"
|
|
|
|
"https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev"
|
|
|
|
"https://plugins.gradle.org/m2"
|
|
|
|
];
|
|
|
|
deps = builtins.fromJSON (builtins.readFile ./deps.json);
|
|
|
|
};
|
|
|
|
|
|
|
|
builtWithGradle = callPackage ./build.nix { };
|
|
|
|
})
|