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".
This commit is contained in:
Rouven Czerwinski 2020-12-30 20:00:35 +01:00
parent 4d461177a7
commit b5a0c7466c

View file

@ -1,5 +1,5 @@
{ lib, mkDerivation, fetchgit { 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 }: , qtsvg , pkg-config, protobuf , python3Packages, SDL2, stdenv }:
with stdenv.lib; with stdenv.lib;
@ -18,7 +18,8 @@ mkDerivation rec {
cmake pkg-config protobuf python3Packages.python python3Packages.protobuf cmake pkg-config protobuf python3Packages.python python3Packages.protobuf
]; ];
buildInputs = [ ffmpeg libopus qtbase qtmultimedia qtsvg protobuf SDL2 ] 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; doCheck = true;
installCheckPhase = "$out/bin/chiaki --help"; installCheckPhase = "$out/bin/chiaki --help";