commandergenius: fix broken build (#410760)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitLab,
|
||||
fetchpatch,
|
||||
SDL2,
|
||||
SDL2_image,
|
||||
pkg-config,
|
||||
@@ -14,6 +15,7 @@
|
||||
SDL2_mixer,
|
||||
SDL2_ttf,
|
||||
python3,
|
||||
xorg,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -38,6 +40,7 @@ stdenv.mkDerivation rec {
|
||||
zlib
|
||||
curl
|
||||
python3
|
||||
xorg.libX11
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
@@ -54,6 +57,16 @@ stdenv.mkDerivation rec {
|
||||
pkg-config
|
||||
];
|
||||
|
||||
patches = [
|
||||
# Fixes a broken build due to a renamed inner struct of SDL_ttf.
|
||||
# Should be removable as soon as upstream releases v. 3.5.3.
|
||||
(fetchpatch {
|
||||
name = "fix-sdl-ttf_font_rename.patch";
|
||||
url = "https://github.com/gerstrong/Commander-Genius/commit/e8af0d16970d75e94392f57de0992dfddc509bc3.patch";
|
||||
hash = "sha256-bcCzXzh9yDngwHMfQTrnvyDal4YBiBcMTtKTgt9BtDk=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(sdl2-config --cflags)"
|
||||
sed -i 's,APPDIR games,APPDIR bin,' src/install.cmake
|
||||
|
||||
Reference in New Issue
Block a user