mirror of
https://github.com/fredrikr79/SnakeDL3.git
synced 2025-06-10 15:23:46 +02:00
chore: add nix deps. management
This commit is contained in:
parent
1630ae7695
commit
b7ec69306f
1
.envrc
Normal file
1
.envrc
Normal file
@ -0,0 +1 @@
|
|||||||
|
use nix
|
19
README.md
19
README.md
@ -1,2 +1,21 @@
|
|||||||
# SnakeDL3
|
# SnakeDL3
|
||||||
a game of snake written in the brand new SDL3/C
|
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
7
shell.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ pkgs ? import <nixpkgs> {} }: pkgs.mkShell {
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
libgcc
|
||||||
|
sdl3
|
||||||
|
gnumake
|
||||||
|
];
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user