diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ca91c22 --- /dev/null +++ b/flake.nix @@ -0,0 +1,56 @@ +{ + description = "minecraft java"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { + nixpkgs, + flake-utils, + ... + }: let + lib = nixpkgs.lib; + supportedSystems = let + inherit (flake-utils.lib) system; + in [ + system.aarch64-linux + system.x86_64-linux + ]; + in + flake-utils.lib.eachSystem supportedSystems (system: let + pkgs = import nixpkgs {inherit system;}; + libs = with pkgs; [ + libGL + alsa-lib + assimp + openal + stb + pulseaudio + wayland + wayland-scanner + xorg.libXrandr + xorg.libXinerama + xorg.libXcursor + xorg.libXi + xorg.libX11 + libxkbcommon + ]; + in { + devShell = + pkgs.mkShell + { + packages = with pkgs; + [ + maven + jdk8 + ] + ++ libs; + + LD_LIBRARY_PATH = lib.makeLibraryPath libs; + }; + + formatter = pkgs.alejandra; + }); +} |