Incendium addon
1{
2 inputs = {
3 nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
4 };
5
6 outputs = {nixpkgs, ...} @ inputs: let
7 lib = nixpkgs.lib;
8 supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
9 forEachSupportedSystem = f:
10 lib.genAttrs supportedSystems (system:
11 f {
12 pkgs = import nixpkgs {inherit system;};
13 });
14 in {
15 devShells = forEachSupportedSystem ({pkgs}: let
16 java21 = pkgs.temurin-bin-21;
17 java17 = pkgs.temurin-bin-17;
18
19 nativeBuildInputs = with pkgs; [
20 java21
21 java17
22 kotlin
23 kotlin-language-server
24 ];
25
26 buildInputs = with pkgs; [
27 libGL
28 glfw3-minecraft
29 flite
30 libpulseaudio
31 ];
32 in {
33 default = pkgs.mkShell {
34 inherit nativeBuildInputs buildInputs;
35
36 env = {
37 LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
38 JAVA_HOME = "${java21.home}";
39 JDK21 = "${java21.home}";
40 JDK17 = "${java17.home}";
41 };
42 };
43 });
44 };
45}