2021-06-04 13:29:50 +02:00
|
|
|
{ stdenv, lib, fetchFromGitHub
|
|
|
|
, gettext, libpng, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, zlib
|
2021-12-31 23:35:32 +01:00
|
|
|
|
|
|
|
# updater only
|
|
|
|
, nix-update-script
|
2021-06-04 13:29:50 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fheroes2";
|
2022-04-09 21:33:52 +02:00
|
|
|
version = "0.9.14";
|
2021-06-04 13:29:50 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ihhub";
|
|
|
|
repo = "fheroes2";
|
|
|
|
rev = version;
|
2022-04-09 21:33:52 +02:00
|
|
|
sha256 = "sha256-M5sUEOKU7KSenAAE7dUI8algB5XsbQQ1s3sDflZLsiA=";
|
2021-06-04 13:29:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ gettext libpng SDL2 SDL2_image SDL2_mixer SDL2_ttf zlib ];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"FHEROES2_STRICT_COMPILATION=1"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm755 $PWD/src/dist/fheroes2 $out/bin/fheroes2
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-12-31 23:35:32 +01:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-06-04 13:29:50 +02:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/ihhub/fheroes2";
|
|
|
|
description = "Free implementation of Heroes of Might and Magic II game engine";
|
|
|
|
longDescription = ''
|
|
|
|
In order to play this game, an original game data is required.
|
|
|
|
Please refer to README of the project for instructions.
|
|
|
|
On linux, the data can be placed in ~/.local/share/fheroes2 folder.
|
|
|
|
'';
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = [ maintainers.karolchmist ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|