forked from karpathy/llama2.c
-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
48 lines (44 loc) · 1.2 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
47
48
{
description = "android port llama2.c";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
devshell.url = "github:numtide/devshell";
flake-utils.url = "github:numtide/flake-utils";
android.url = "github:tadfisher/android-nixpkgs";
};
outputs = { self, nixpkgs, devshell, flake-utils, android }:
{
overlay = final: prev: {
inherit (self.packages.${final.system}) android-sdk android-studio;
};
}
//
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 = {
android-sdk = android.sdk.${system} (sdkPkgs: with sdkPkgs; [
build-tools-30-0-2
cmdline-tools-latest
emulator
platform-tools
platforms-android-3
ndk-bundle
]);
android-studio = pkgs.androidStudioPackages.stable;
gcc = pkgs.gcc;
wget = pkgs.wget;
};
devShell = import ./devshell.nix { inherit pkgs; };
}
);
}