Merge pull request #133362 from r-ryantm/auto-update/antsimulator

This commit is contained in:
Artturi 2021-08-11 04:40:00 +03:00 committed by GitHub
commit a4c256fa86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
'';