0
0
mirror of https://github.com/fredrikr79/SnakeDL3.git synced 2025-05-26 00:54:25 +02:00

chore: add nix deps. management

This commit is contained in:
Fredrik Robertsen 2025-02-01 10:21:44 +01:00
parent 1630ae7695
commit b7ec69306f
3 changed files with 27 additions and 0 deletions

1
.envrc Normal file

@ -0,0 +1 @@
use nix

@ -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
```

7
shell.nix Normal file

@ -0,0 +1,7 @@
{ pkgs ? import <nixpkgs> {} }: pkgs.mkShell {
nativeBuildInputs = with pkgs; [
libgcc
sdl3
gnumake
];
}