# Template: https://nixos-and-flakes.thiscute.world/development/intro { description = "TinyEMU Nix Dev Shell (Flake-Based)"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; }; outputs = {nixpkgs, ...}: let # system should match the system you are running on system = "x86_64-linux"; in { devShells."${system}".default = let pkgs = import nixpkgs { inherit system; }; in pkgs.mkShell { packages = with pkgs; [ # Compilation gnumake emscripten # C Libraries SDL # Simple DirectMedia Layer curl openssl ]; shell = "${pkgs.bash}/bin/bash"; shellHook = '' # Ref: https://github.com/NixOS/nixpkgs/issues/139943 export EM_CACHE=$PWD/.emscripten_cache cp -r ${pkgs.emscripten}/share/emscripten/cache $EM_CACHE chmod u+rwX -R $EM_CACHE ''; }; }; }