diff --git a/doc/Building.md b/doc/Building.md index bfd47937b..87e7be3df 100644 --- a/doc/Building.md +++ b/doc/Building.md @@ -133,6 +133,15 @@ brew install ccache gettext luacheck p7zip export MACOSX_DEPLOYMENT_TARGET=10.09 ``` +### Nix + +Ensure the [nix is installed](https://nixos.org/download/). + +Then simply run the included nix shell: +``` +nix-shell tools/shell.nix +``` + ## Getting the source diff --git a/tools/shell.nix b/tools/shell.nix new file mode 100644 index 000000000..4d2db984e --- /dev/null +++ b/tools/shell.nix @@ -0,0 +1,35 @@ +let + nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-25.05"; + pkgs = import nixpkgs { config = {}; overlays = []; }; +in + +pkgs.mkShell { + packages = with pkgs; [ + autoconf + automake + libtool + cmake + gcc + git + gnumake + meson + nasm + ninja + gnupatch + perl + pkg-config + unzip + wget + + SDL2 + + p7zip + ccache + gettext + luajitPackages.luacheck + ]; + + shellHook = '' + export LD_LIBRARY_PATH=${pkgs.SDL2}/lib:$LD_LIBRARY_PATH + ''; +}