diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..1d953f4b --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/.gitignore b/.gitignore index c1754b5a..1e7aaa6b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .DS_Store *.cache *.ebf +.direnv diff --git a/scripts/deps.sh b/scripts/deps.sh index d904017a..dcbe0fac 100755 --- a/scripts/deps.sh +++ b/scripts/deps.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Check if we are on Debian or Fedora, and call either deps.debian.sh or deps.fedora.sh diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..9c774b90 --- /dev/null +++ b/shell.nix @@ -0,0 +1,14 @@ +with import {}; +stdenv.mkDerivation { + name = "env"; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ + SDL2 + SDL2_ttf + SDL2_gfx + SDL2_image + libffi + zlib + python3 + ]; +} diff --git a/src/base/eve/Makefile b/src/base/eve/Makefile index 5fa184c6..b9aac4b4 100644 --- a/src/base/eve/Makefile +++ b/src/base/eve/Makefile @@ -1,7 +1,7 @@ # Compiler and linker options CC := gcc -CFLAGS := -Wall -Werror -fPIC -MMD $(shell sdl2-config --cflags) -LDFLAGS := -lm -shared $(shell sdl2-config --libs) +CFLAGS := -Wall -Werror -fPIC -MMD $(shell pkg-config --cflags sdl2 SDL2_ttf SDL2_gfx SDL2_image) +LDFLAGS := -lm -shared $(shell pkg-config --libs sdl2 SDL2_ttf SDL2_gfx SDL2_image) LIBS := -lSDL2 -lSDL2_ttf -lSDL2_image -lSDL2_gfx # Source files and object files