From 07ebaed9748fa97ccf3784b88193076211d2c865 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 10 Aug 2021 11:05:35 +0000 Subject: [PATCH 1/2] antsimulator: 1.2 -> 3.1 --- pkgs/games/antsimulator/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/games/antsimulator/default.nix b/pkgs/games/antsimulator/default.nix index b43b91d5cb99..bb17add2cc9d 100644 --- a/pkgs/games/antsimulator/default.nix +++ b/pkgs/games/antsimulator/default.nix @@ -2,13 +2,13 @@ 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 ]; From 58156d95e927cc51956b03b88a0f187a650fa4ac Mon Sep 17 00:00:00 2001 From: Artturin Date: Wed, 11 Aug 2021 04:31:46 +0300 Subject: [PATCH 2/2] antsimulator: fix texture path --- pkgs/games/antsimulator/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/games/antsimulator/default.nix b/pkgs/games/antsimulator/default.nix index bb17add2cc9d..bac481c88f35 100644 --- a/pkgs/games/antsimulator/default.nix +++ b/pkgs/games/antsimulator/default.nix @@ -14,8 +14,19 @@ stdenv.mkDerivation rec { 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 '';