wifisetup/nix/default.nix

41 lines
1.3 KiB
Nix

{ sources ? import ../npins, pkgs ? import sources.nixpkgs {}, lib ? pkgs.lib, android ? import sources.android {} }:
let
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=";
};
});
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; {
inherit androidSdk aapt2;
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 { };
})