1 { lib, stdenv, fetchFromGitHub, cmake, sfml }:
3 stdenv.mkDerivation rec {
4 pname = "antsimulator";
7 src = fetchFromGitHub {
11 sha256 = "sha256-1KWoGbdjF8VI4th/ZjAzASgsLEuS3xiwObulzxQAppA=";
14 nativeBuildInputs = [ cmake ];
15 buildInputs = [ sfml ];
18 substituteInPlace src/main.cpp \
19 --replace "res/" "$out/opt/antsimulator/"
21 substituteInPlace include/simulation/config.hpp \
22 --replace "res/" "$out/opt/antsimulator/"
24 substituteInPlace include/render/colony_renderer.hpp \
25 --replace "res/" "$out/opt/antsimulator/"
29 install -Dm644 -t $out/opt/antsimulator res/*
30 install -Dm755 ./AntSimulator $out/bin/antsimulator
34 homepage = "https://github.com/johnBuffer/AntSimulator";
35 description = "Simple Ants simulator";
36 license = licenses.free;
37 maintainers = with maintainers; [ ivar ];
38 platforms = platforms.unix;