ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / games / antsimulator / default.nix
blobbac481c88f35354250c85f861a7f3b1a2518610d
1 { lib, stdenv, fetchFromGitHub, cmake, sfml }:
3 stdenv.mkDerivation rec {
4   pname = "antsimulator";
5   version = "3.1";
7   src = fetchFromGitHub {
8     owner = "johnBuffer";
9     repo = "AntSimulator";
10     rev = "v${version}";
11     sha256 = "sha256-1KWoGbdjF8VI4th/ZjAzASgsLEuS3xiwObulzxQAppA=";
12   };
14   nativeBuildInputs = [ cmake ];
15   buildInputs = [ sfml ];
17   postPatch = ''
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/"
26   '';
28   installPhase = ''
29     install -Dm644 -t $out/opt/antsimulator res/*
30     install -Dm755 ./AntSimulator $out/bin/antsimulator
31   '';
33   meta = with lib; {
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;
39   };