audiobookshelf: 2.18.1 -> 2.19.0 (#378967)
[NixPkgs.git] / pkgs / by-name / an / antsimulator / package.nix
blob70015266a18b5ac960eea914f24e1ea80745f68a
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   cmake,
6   sfml,
7 }:
9 stdenv.mkDerivation rec {
10   pname = "antsimulator";
11   version = "3.1";
13   src = fetchFromGitHub {
14     owner = "johnBuffer";
15     repo = "AntSimulator";
16     rev = "v${version}";
17     sha256 = "sha256-1KWoGbdjF8VI4th/ZjAzASgsLEuS3xiwObulzxQAppA=";
18   };
20   nativeBuildInputs = [ cmake ];
21   buildInputs = [ sfml ];
23   postPatch = ''
24     substituteInPlace src/main.cpp \
25       --replace "res/" "$out/opt/antsimulator/"
27     substituteInPlace include/simulation/config.hpp \
28       --replace "res/" "$out/opt/antsimulator/"
30     substituteInPlace include/render/colony_renderer.hpp \
31       --replace "res/" "$out/opt/antsimulator/"
32   '';
34   installPhase = ''
35     install -Dm644 -t $out/opt/antsimulator res/*
36     install -Dm755 ./AntSimulator $out/bin/antsimulator
37   '';
39   meta = with lib; {
40     homepage = "https://github.com/johnBuffer/AntSimulator";
41     description = "Simple Ants simulator";
42     mainProgram = "antsimulator";
43     license = licenses.mit;
44     maintainers = [ ];
45     platforms = platforms.unix;
46   };