openclonk: fix build

cmake complained about not finding X11_LIBRARIES, which is fixed by
providing libXrandr.

Adding ninja fixes the installPhase which fails randomly. There is a
hack in upstream's CMakeLists.txt file that reads:

  USES_TERMINAL # Hack: prevent parallel execution (for ninja), c4group
tends to fail otherwise

This only works with ninja, though. Also enable parallel install phase
again, since this seems to work with ninja now.

This also fixes the build for aarch64-linux.
This commit is contained in:
Wolfgang Walther
2025-05-03 12:18:55 +02:00
parent 1173897ec5
commit 3a2b296855
+5 -6
View File
@@ -9,6 +9,7 @@
# nativeBuildInputs
cmake,
ninja,
pkg-config,
gcc-unwrapped,
@@ -24,6 +25,7 @@
libogg,
libpng,
libvorbis,
libXrandr,
openal,
readline,
SDL2,
@@ -60,14 +62,13 @@ stdenv.mkDerivation {
})
];
enableParallelInstalling = false;
postInstall = lib.optionalString enableSoundtrack ''
ln -sv ${soundtrack_src} $out/share/games/openclonk/Music.ocg
'';
nativeBuildInputs = [
cmake
ninja
pkg-config
];
@@ -82,6 +83,7 @@ stdenv.mkDerivation {
libogg
libpng
libvorbis
libXrandr
openal
readline
SDL2
@@ -101,9 +103,6 @@ stdenv.mkDerivation {
license = if enableSoundtrack then licenses.unfreeRedistributable else licenses.isc;
mainProgram = "openclonk";
maintainers = [ ];
platforms = [
"x86_64-linux"
"i686-linux"
];
platforms = lib.platforms.linux;
};
}