diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..1d953f4 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/README.md b/README.md index dfa9dbb..caabed4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ # SnakeDL3 a game of snake written in the brand new SDL3/C + + +## running the game + +this game uses [nix](https://nixos.org/) to manage dependencies. + +after downloading nix, you can simply clone the repository, enter the directory +with direnv enabled and you will automatically get all the dependencies needed. + +if you don't have direnv, you can run +```bash + $ nix-shell . +``` +to enter a shell with the required dependencies. + +after this, you can run the game by typing +```bash + $ make run +``` diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..d4afce5 --- /dev/null +++ b/shell.nix @@ -0,0 +1,7 @@ +{ pkgs ? import {} }: pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + libgcc + sdl3 + gnumake + ]; +}