From af50d7111374be03eced1c65da5a392c5d37fee9 Mon Sep 17 00:00:00 2001 From: MartV0 <34748938+MartV0@users.noreply.github.com> Date: Sun, 14 Sep 2025 17:13:02 +0200 Subject: [PATCH] Added shell.nix and updated Building.md (#14019) --- doc/Building.md | 9 +++++++++ tools/shell.nix | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 tools/shell.nix 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 + ''; +}