diff --git a/pkgs/games/antsimulator/default.nix b/pkgs/games/antsimulator/default.nix index b43b91d5cb99..bac481c88f35 100644 --- a/pkgs/games/antsimulator/default.nix +++ b/pkgs/games/antsimulator/default.nix @@ -2,20 +2,31 @@ stdenv.mkDerivation rec { pname = "antsimulator"; - version = "1.2"; + version = "3.1"; src = fetchFromGitHub { owner = "johnBuffer"; repo = "AntSimulator"; rev = "v${version}"; - sha256 = "0wz80971rf86kb7mcnxwrq75vriwhmyir5s5n3wzml12rzfnj5f1"; + sha256 = "sha256-1KWoGbdjF8VI4th/ZjAzASgsLEuS3xiwObulzxQAppA="; }; nativeBuildInputs = [ cmake ]; buildInputs = [ sfml ]; + postPatch = '' + substituteInPlace src/main.cpp \ + --replace "res/" "$out/opt/antsimulator/" + + substituteInPlace include/simulation/config.hpp \ + --replace "res/" "$out/opt/antsimulator/" + + substituteInPlace include/render/colony_renderer.hpp \ + --replace "res/" "$out/opt/antsimulator/" + ''; + installPhase = '' - mkdir -p $out/bin + install -Dm644 -t $out/opt/antsimulator res/* install -Dm755 ./AntSimulator $out/bin/antsimulator '';