From 3a2b29685533af75e754f2cbdd5631c00089856e Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 3 May 2025 11:36:26 +0200 Subject: [PATCH] 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. --- pkgs/by-name/op/openclonk/package.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/op/openclonk/package.nix b/pkgs/by-name/op/openclonk/package.nix index 373be399769d..3da07ca1be7f 100644 --- a/pkgs/by-name/op/openclonk/package.nix +++ b/pkgs/by-name/op/openclonk/package.nix @@ -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; }; }