Skip to content

Instantly share code, notes, and snippets.

@theneosloth
Created February 12, 2025 23:15
Show Gist options
  • Save theneosloth/3320cbdd3082534aadf302d646f38d6a to your computer and use it in GitHub Desktop.
Save theneosloth/3320cbdd3082534aadf302d646f38d6a to your computer and use it in GitHub Desktop.
flake.nix for Common Lisp game development
{
inputs = {
utils.url = "github:numtide/flake-utils";
nixgl.url = "github:nix-community/nixGL";
};
outputs = { self, nixgl, nixpkgs, utils }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
system = system;
overlays = [ nixgl.overlay ];
};
in {
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs;
[
(sbcl.withPackages (ps:
with ps; [
pkgs.nixgl.nixGLIntel
sbclPackages.cl-opengl
sbclPackages.sdl2
sbclPackages.sdl2-ttf
sbclPackages.sdl2-image
sbclPackages.trivial-garbage
sbclPackages.cl-liballegro
]))
];
shellHook = ''
library_path="$LD_LIBRARY_PATH"
export $(env -i $(which nixGLIntel) $(which printenv))
export LD_LIBRARY_PATH="$library_path:$LD_LIBRARY_PATH"
'';
};
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment