mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +03:00
commandergenius: fix broken build due to renamed _TTF_Font
struct in SDL_ttf
SDL_ttf renamed the internal `_TTF_Font` struct in v. 2.24 [^1] and 3.2.2 [^2], breaking current builds for commandergenius. Upstream already merged my pull request fixing the error [^3]. This pulls in the fix temporarily using `fetchpatch`; as soon as upstreams a new release, we'll likely be able to remove it again. [^1]:7185085beb
[^2]:22347419ee
[^3]: https://github.com/gerstrong/Commander-Genius/pull/376
This commit is contained in:
parent
b722a78968
commit
5cc6a9481c
1 changed files with 11 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
lib,
|
||||
stdenv,
|
||||
fetchFromGitLab,
|
||||
fetchpatch,
|
||||
SDL2,
|
||||
SDL2_image,
|
||||
pkg-config,
|
||||
|
@ -56,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue