Files
game-jam/flake.nix
2026-02-18 21:58:08 -06:00

53 lines
1.2 KiB
Nix

{
description = "Odin shell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forAllSystems ({ pkgs }: {
default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
odin
ols
emscripten
];
buildInputs = with pkgs; [
libGL
raylib
raygui
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXrandr
];
shellHook = ''
echo "// ODIN DEV SHELL //"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${with pkgs; lib.makeLibraryPath [
libGL
raylib
raygui
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXrandr
]}"
'';
};
});
};
}