Skip to content

Commit 0a209f7

Browse files
committed
flake.*: upgrade to nixpkgs 25.05, use nixpkgs android SDK
Signed-off-by: Elias Naur <[email protected]>
1 parent 0225334 commit 0a209f7

File tree

2 files changed

+60
-106
lines changed

2 files changed

+60
-106
lines changed

flake.lock

Lines changed: 23 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 37 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,38 @@
33
description = "Gio build environment";
44

55
inputs = {
6-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
7-
android.url = "github:tadfisher/android-nixpkgs";
8-
android.inputs.nixpkgs.follows = "nixpkgs";
6+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
7+
utils.url = "github:numtide/flake-utils";
98
};
109

11-
outputs = { self, nixpkgs, android }:
12-
let
13-
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
14-
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
15-
in
16-
{
17-
devShells = forAllSystems
18-
(system:
19-
let
20-
pkgs = import nixpkgs {
21-
inherit system;
10+
outputs = { self, nixpkgs, utils }:
11+
utils.lib.eachDefaultSystem (system:
12+
let
13+
pkgs = import nixpkgs {
14+
inherit system;
15+
16+
# allow unfree Android packages.
17+
config.allowUnfree = true;
18+
# accept the Android SDK license.
19+
config.android_sdk.accept_license = true;
20+
};
21+
in {
22+
devShells = let
23+
android-sdk = let
24+
androidComposition = pkgs.androidenv.composeAndroidPackages {
25+
platformVersions = [ "latest" ];
26+
abiVersions = [ "armeabi-v7a" "arm64-v8a" ];
27+
# Omit the deprecated tools package.
28+
toolsVersion = null;
29+
includeNDK = true;
2230
};
23-
android-sdk = android.sdk.${system} (sdkPkgs: with sdkPkgs;
24-
[
25-
build-tools-31-0-0
26-
cmdline-tools-latest
27-
platform-tools
28-
platforms-android-31
29-
ndk-bundle
30-
]);
31-
in
32-
{
33-
default = with pkgs; mkShell
34-
({
35-
ANDROID_SDK_ROOT = "${android-sdk}/share/android-sdk";
36-
JAVA_HOME = jdk17.home;
37-
packages = [
38-
android-sdk
39-
jdk17
40-
clang
41-
] ++ (if stdenv.isLinux then [
31+
in androidComposition.androidsdk;
32+
in {
33+
default = with pkgs;
34+
mkShell (rec {
35+
ANDROID_HOME = "${android-sdk}/libexec/android-sdk";
36+
packages = [ android-sdk jdk clang ]
37+
++ (if stdenv.isLinux then [
4238
vulkan-headers
4339
libxkbcommon
4440
wayland
@@ -47,11 +43,12 @@
4743
xorg.libXfixes
4844
libGL
4945
pkg-config
50-
] else [ ]);
51-
} // (if stdenv.isLinux then {
52-
LD_LIBRARY_PATH = "${vulkan-loader}/lib";
53-
} else { }));
54-
}
55-
);
56-
};
46+
] else
47+
[ ]);
48+
} // (if stdenv.isLinux then {
49+
LD_LIBRARY_PATH = "${vulkan-loader}/lib";
50+
} else
51+
{ }));
52+
};
53+
});
5754
}

0 commit comments

Comments
 (0)