mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 05:13:04 +00:00
cf0edc3321
The currently packaged version of `Commander-Genius` stopped building with GCC 13, because GCC stopped transitively pulling in a couple of standard headers in various scenarios. Among these is `cstdint`, which declares a couple of standard integer types like `uint32_t`. At the same time, the currently packaged version is rather old already, and these build issues have been resolved upstream in newer versions. This change updates `Commander-Genius` to the most recent upstream release, fixing said build issues in the process as a side effect.
58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitLab
|
|
, SDL2
|
|
, SDL2_image
|
|
, pkg-config
|
|
, libvorbis
|
|
, libGL
|
|
, boost
|
|
, cmake
|
|
, zlib
|
|
, curl
|
|
, SDL2_mixer
|
|
, SDL2_ttf
|
|
, python3
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "commandergenius";
|
|
version = "3.5.0";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "Dringgstein";
|
|
repo = "Commander-Genius";
|
|
rev = "v${version}";
|
|
hash = "sha256-w5DP7vkvWOs8qcHqoQaEWHnaBwUoi1I4gnE+Z3haHxE=";
|
|
};
|
|
|
|
buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_ttf libGL boost libvorbis zlib curl python3 ];
|
|
|
|
preConfigure = ''
|
|
export cmakeFlags="$cmakeFlags -DCMAKE_INSTALL_PREFIX=$out -DSHAREDIR=$out/share"
|
|
export makeFlags="$makeFlags DESTDIR=$(out)"
|
|
'';
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
postPatch = ''
|
|
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(sdl2-config --cflags)"
|
|
sed -i 's,APPDIR games,APPDIR bin,' src/install.cmake
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Modern Interpreter for the Commander Keen Games";
|
|
longDescription = ''
|
|
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
|
|
'';
|
|
homepage = "https://github.com/gerstrong/Commander-Genius";
|
|
maintainers = with maintainers; [ hce ];
|
|
license = licenses.gpl2;
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|