-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
54 lines (51 loc) · 1.61 KB
/
flake.nix
File metadata and controls
54 lines (51 loc) · 1.61 KB
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
49
50
51
52
53
54
# SPDX-License-Identifier: Unlicense OR MIT
{
description = "Gio build environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
# allow unfree Android packages.
config.allowUnfree = true;
# accept the Android SDK license.
config.android_sdk.accept_license = true;
};
in {
devShells = let
android-sdk = let
androidComposition = pkgs.androidenv.composeAndroidPackages {
platformVersions = [ "latest" ];
abiVersions = [ "armeabi-v7a" "arm64-v8a" ];
# Omit the deprecated tools package.
toolsVersion = null;
includeNDK = true;
};
in androidComposition.androidsdk;
in {
default = with pkgs;
mkShell (rec {
ANDROID_HOME = "${android-sdk}/libexec/android-sdk";
packages = [ android-sdk jdk clang ]
++ (if stdenv.isLinux then [
vulkan-headers
libxkbcommon
wayland
xorg.libX11
xorg.libXcursor
xorg.libXfixes
libGL
pkg-config
] else
[ ]);
} // (if stdenv.isLinux then {
LD_LIBRARY_PATH = "${vulkan-loader}/lib";
} else
{ }));
};
});
}