Created
April 21, 2025 16:10
-
-
Save tcheneau/75a9cb4166b0e898429cbd1b71eaa505 to your computer and use it in GitHub Desktop.
Building and running ebiten based golang programs on NixOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { pkgs ? import <nixpkgs> {} }: | |
| # run nix-shell to initialize the environment | |
| pkgs.mkShell { | |
| # nativeBuildInputs is usually what you want -- tools you need to run | |
| nativeBuildInputs = with pkgs.buildPackages; [ xorg.libX11 xorg.libXcursor xorg.libXrandr xorg.libXinerama xorg.libXi xorg.libXext libGL xorg.libXxf86vm ]; | |
| shellHook = "EBITENGINE_LIBGL=\"${pkgs.libGL}/lib/libGL.so\"; export EBITENGINE_LIBGL; EBITENGINE_LIBGLESv2=\"${pkgs.libGL}/lib/libGLESv2.so\"; export EBITENGINE_LIBGLESv2; export LD_LIBRARY_PATH=\"${pkgs.libGL}/lib:$LD_LIBRARY_PATH\";"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment