depot/third_party/nixpkgs/pkgs/games/augustus/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

59 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
SDL2,
SDL2_mixer,
libpng,
darwin,
libicns,
imagemagick,
}:
stdenv.mkDerivation rec {
pname = "augustus";
version = "4.0.0";
src = fetchFromGitHub {
owner = "Keriew";
repo = "augustus";
rev = "v${version}";
sha256 = "sha256-UWJmxirRJJqvL4ZSjBvFepeKVvL77+WMp4YdZuFNEkg=";
};
patches = [ ./darwin-fixes.patch ];
nativeBuildInputs =
[ cmake ]
++ lib.optionals stdenv.isDarwin [
darwin.sigtool
libicns
imagemagick
];
buildInputs = [
SDL2
SDL2_mixer
libpng
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ];
installPhase = lib.optionalString stdenv.isDarwin ''
runHook preInstall
mkdir -p $out/Applications
cp -r augustus.app $out/Applications/
runHook postInstall
'';
meta = with lib; {
description = "Open source re-implementation of Caesar III. Fork of Julius incorporating gameplay changes";
mainProgram = "augustus";
homepage = "https://github.com/Keriew/augustus";
license = licenses.agpl3Only;
platforms = platforms.unix;
maintainers = with maintainers; [
Thra11
matteopacini
];
};
}