2024-01-26 15:53:16 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitLab
|
|
|
|
, SDL2
|
|
|
|
, SDL2_image
|
|
|
|
, pkg-config
|
|
|
|
, libvorbis
|
|
|
|
, libGL
|
|
|
|
, boost
|
|
|
|
, cmake
|
|
|
|
, zlib
|
|
|
|
, curl
|
|
|
|
, SDL2_mixer
|
|
|
|
, SDL2_ttf
|
|
|
|
, python3
|
2018-03-27 21:15:24 +02:00
|
|
|
}:
|
2016-07-13 19:24:18 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "commandergenius";
|
2024-07-12 05:23:18 +02:00
|
|
|
version = "3.5.1";
|
2016-07-13 19:24:18 +02:00
|
|
|
|
2019-03-18 19:51:00 +01:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "Dringgstein";
|
2016-07-13 19:24:18 +02:00
|
|
|
repo = "Commander-Genius";
|
|
|
|
rev = "v${version}";
|
2024-07-12 05:23:18 +02:00
|
|
|
hash = "sha256-sWnx2UdnuuLcTxhuXhfG2ssnFvuGi9kOBrpc4jiKgTs=";
|
2016-07-13 19:24:18 +02:00
|
|
|
};
|
|
|
|
|
2024-01-26 15:53:16 +01:00
|
|
|
buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_ttf libGL boost libvorbis zlib curl python3 ];
|
2018-03-27 21:15:24 +02:00
|
|
|
|
2024-08-21 16:31:10 +02:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
|
|
|
|
"-DSHAREDIR=${placeholder "out"}/share"
|
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"DESTDIR=${placeholder "out"}"
|
|
|
|
];
|
2016-07-13 19:24:18 +02:00
|
|
|
|
2021-01-17 06:49:22 +01:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2016-07-13 19:24:18 +02:00
|
|
|
|
2016-08-22 07:39:42 +02:00
|
|
|
postPatch = ''
|
|
|
|
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(sdl2-config --cflags)"
|
|
|
|
sed -i 's,APPDIR games,APPDIR bin,' src/install.cmake
|
2016-07-13 19:24:18 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2016-07-13 19:24:18 +02:00
|
|
|
description = "Modern Interpreter for the Commander Keen Games";
|
2017-12-05 23:20:11 +01:00
|
|
|
longDescription = ''
|
2016-07-13 19:24:18 +02:00
|
|
|
Commander Genius is an open-source clone of
|
|
|
|
Commander Keen which allows you to play
|
|
|
|
the games, and some of the mods
|
|
|
|
made for it. All of the original data files
|
|
|
|
are required to do so
|
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/gerstrong/Commander-Genius";
|
2016-08-22 07:39:42 +02:00
|
|
|
maintainers = with maintainers; [ hce ];
|
2024-07-03 11:37:36 +02:00
|
|
|
license = licenses.gpl2Plus;
|
2016-08-22 07:39:42 +02:00
|
|
|
platforms = platforms.linux;
|
2016-07-13 19:24:18 +02:00
|
|
|
};
|
|
|
|
}
|