summary refs log tree commit diff
path: root/pkgs/games/antsimulator
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games/antsimulator')
-rw-r--r--pkgs/games/antsimulator/default.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/games/antsimulator/default.nix b/pkgs/games/antsimulator/default.nix
index bb17add2cc9..bac481c88f3 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
   '';