From b5a0c7466c286b852436d6aaed5826a639212641 Mon Sep 17 00:00:00 2001 From: Rouven Czerwinski Date: Wed, 30 Dec 2020 20:00:35 +0100 Subject: [PATCH] chiaki: fix build on darwin Darwin requires qtmacextra in the buildInputs, otherwise compilation fails with: CMake Error at /nix/store/05nmn6v1hrk56zqs61s2awvykha51fx9-qtbase-5.12.7-dev/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package): By not providing "FindQt5MacExtras.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5MacExtras", but CMake did not find one. Could not find a package configuration file provided by "Qt5MacExtras" with any of the following names: Qt5MacExtrasConfig.cmake qt5macextras-config.cmake Add the installation prefix of "Qt5MacExtras" to CMAKE_PREFIX_PATH or set "Qt5MacExtras_DIR" to a directory containing one of the above files. If "Qt5MacExtras" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): gui/CMakeLists.txt:7 (find_package) -- Configuring incomplete, errors occurred! See also "/tmp/nix-build-chiaki-2.0.1.drv-0/chiaki/build/CMakeFiles/CMakeOutput.log". --- pkgs/games/chiaki/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/games/chiaki/default.nix b/pkgs/games/chiaki/default.nix index 22e1c31eff1..63afec7264c 100644 --- a/pkgs/games/chiaki/default.nix +++ b/pkgs/games/chiaki/default.nix @@ -1,5 +1,5 @@ { lib, mkDerivation, fetchgit -, cmake, ffmpeg, libevdev, libopus, udev, qtbase, qtmultimedia +, cmake, ffmpeg, libevdev, libopus, udev, qtbase, qtmacextras, qtmultimedia , qtsvg , pkg-config, protobuf , python3Packages, SDL2, stdenv }: with stdenv.lib; @@ -18,7 +18,8 @@ mkDerivation rec { cmake pkg-config protobuf python3Packages.python python3Packages.protobuf ]; buildInputs = [ ffmpeg libopus qtbase qtmultimedia qtsvg protobuf SDL2 ] - ++ optionals stdenv.hostPlatform.isLinux [ libevdev udev]; + ++ optionals stdenv.hostPlatform.isLinux [ libevdev udev] + ++ optionals (stdenv.isDarwin) [ qtmacextras ]; doCheck = true; installCheckPhase = "$out/bin/chiaki --help";