openttd: fix build against icu-76

Without the change `openttd` build fails in `master` as
https://hydra.nixos.org/build/290760688:

    [100%] Linking CXX executable openttd
    ld: CMakeFiles/openttd_lib.dir/src/survey.cpp.o: undefined reference to symbol 'u_versionToString_76'
    ld: /nix/store/...-icu4c-76.1/lib/libicuuc.so.76: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
This commit is contained in:
Sergei Trofimovich
2025-02-23 13:32:16 +00:00
parent 7395957192
commit 5d7780931e
2 changed files with 12 additions and 0 deletions
+11
View File
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchzip,
fetchpatch,
cmake,
pkg-config,
SDL2,
@@ -71,6 +72,16 @@ stdenv.mkDerivation rec {
hash = "sha256-YT4IE/rJ9pnpeMWKbOra6AbSUwW19RwOKlXkxwoMeKY=";
};
patches = [
# Fix build against icu-76:
# https://github.com/OpenTTD/OpenTTD/pull/13048
(fetchpatch {
name = "icu-75.patch";
url = "https://github.com/OpenTTD/OpenTTD/commit/14fac2ad37bfb9cec56b4f9169d864f6f1c7b96e.patch";
hash = "sha256-L35ybnTKPO+HVP/7ZYzWM2mA+s1RAywhofSuzpy/6sc=";
})
];
nativeBuildInputs = [
cmake
pkg-config
+1
View File
@@ -10,6 +10,7 @@ openttd.overrideAttrs (oldAttrs: rec {
rev = "jgrpp-${version}";
hash = "sha256-aEmuwWNxqjuLmiWMrqwTUtCwdwDMA00eQspCHntxEXw=";
};
patches = [];
buildInputs = oldAttrs.buildInputs ++ [ zstd ];