Files
nixpkgs/pkgs/by-name/an/antsimulator/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

52 lines
1.1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
sfml_2,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "antsimulator";
version = "3.1";
src = fetchFromGitHub {
owner = "johnBuffer";
repo = "AntSimulator";
tag = "v${finalAttrs.version}";
hash = "sha256-1KWoGbdjF8VI4th/ZjAzASgsLEuS3xiwObulzxQAppA=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ sfml_2 ];
postPatch = ''
substituteInPlace src/main.cpp \
--replace-fail "res/" "$out/opt/antsimulator/"
substituteInPlace include/simulation/config.hpp \
--replace-fail "res/" "$out/opt/antsimulator/"
substituteInPlace include/render/colony_renderer.hpp \
--replace-fail "res/" "$out/opt/antsimulator/"
'';
installPhase = ''
runHook preInstall
install -Dm644 -t $out/opt/antsimulator res/*
install -Dm755 ./AntSimulator $out/bin/antsimulator
runHook postInstall
'';
meta = {
homepage = "https://github.com/johnBuffer/AntSimulator";
description = "Simple Ants simulator";
mainProgram = "antsimulator";
license = lib.licenses.mit;
maintainers = [ ];
platforms = lib.platforms.unix;
};
})