-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
flake.nix
46 lines (43 loc) · 1.21 KB
/
flake.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
description = "My Android project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
devshell.url = "github:numtide/devshell";
flake-utils.url = "github:numtide/flake-utils";
android.url = "github:tadfisher/android-nixpkgs";
zig.url = "github:mitchellh/zig-overlay";
};
outputs = { self, nixpkgs, devshell, flake-utils, android, zig }:
{
overlay = final: prev: {
inherit (self.packages.${final.system}) android-sdk zig;
};
}
//
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
devshell.overlays.default
self.overlay
];
};
in
{
packages = {
zig = zig.packages.${system}.master;
android-sdk = android.sdk.${system} (sdkPkgs: with sdkPkgs; [
# Useful packages for building and testing.
build-tools-33-0-1
cmdline-tools-latest
platform-tools
platforms-android-21
ndk-25-1-8937393
]);
};
devShell = import ./devshell.nix { inherit pkgs; };
}
);
}