From 536a40c3d7bfc645bb4e9ff55b35f1d73b05ca64 Mon Sep 17 00:00:00 2001 From: Rouven Czerwinski Date: Wed, 30 Dec 2020 19:08:07 +0100 Subject: [PATCH 1/3] chiaki: 1.3.0 -> 2.0.1 Also switch the upstream repository from github to git.sr.ht, since the project has been moved to sourcehut. Signed-off-by: Rouven Czerwinski --- pkgs/games/chiaki/default.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/games/chiaki/default.nix b/pkgs/games/chiaki/default.nix index 27dde97ead7b..d703833d452e 100644 --- a/pkgs/games/chiaki/default.nix +++ b/pkgs/games/chiaki/default.nix @@ -1,21 +1,20 @@ -{ lib, mkDerivation, fetchFromGitHub -, cmake, ffmpeg, libopus, qtbase, qtmultimedia, qtsvg, pkgconfig, protobuf +{ lib, mkDerivation, fetchgit +, cmake, ffmpeg, libopus, qtbase, qtmultimedia, qtsvg, pkg-config, protobuf , python3Packages, SDL2 }: mkDerivation rec { pname = "chiaki"; - version = "1.3.0"; + version = "2.0.1"; - src = fetchFromGitHub { + src = fetchgit { + url = "https://git.sr.ht/~thestr4ng3r/chiaki"; rev = "v${version}"; - owner = "thestr4ng3r"; - repo = "chiaki"; fetchSubmodules = true; - sha256 = "07w7srxxr8zjp91p5n1sqf4j8lljfrm78lz1m15s2nzlm579015h"; + sha256 = "0l532i9j6wmzbxqx7fg69kgfd1zy1r1wlw6f756vpxpgswivi892"; }; nativeBuildInputs = [ - cmake pkgconfig protobuf python3Packages.python python3Packages.protobuf + cmake pkg-config protobuf python3Packages.python python3Packages.protobuf ]; buildInputs = [ ffmpeg libopus qtbase qtmultimedia qtsvg protobuf SDL2 ]; From 4d461177a7d0e4e74bab1afd2e798d18d88860a5 Mon Sep 17 00:00:00 2001 From: Rouven Czerwinski Date: Wed, 30 Dec 2020 19:09:43 +0100 Subject: [PATCH 2/3] chiaki: add DualShock4 touchpad support Chiaki supports the touchpad on DualShock4 controllers when they are connected via USB and requires libevdev & udev for this. Add both libraries if chiaki is to be built for a Linux host. --- pkgs/games/chiaki/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/games/chiaki/default.nix b/pkgs/games/chiaki/default.nix index d703833d452e..22e1c31eff1f 100644 --- a/pkgs/games/chiaki/default.nix +++ b/pkgs/games/chiaki/default.nix @@ -1,7 +1,8 @@ { lib, mkDerivation, fetchgit -, cmake, ffmpeg, libopus, qtbase, qtmultimedia, qtsvg, pkg-config, protobuf -, python3Packages, SDL2 }: +, cmake, ffmpeg, libevdev, libopus, udev, qtbase, qtmultimedia +, qtsvg , pkg-config, protobuf , python3Packages, SDL2, stdenv }: +with stdenv.lib; mkDerivation rec { pname = "chiaki"; version = "2.0.1"; @@ -16,7 +17,8 @@ mkDerivation rec { nativeBuildInputs = [ 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]; doCheck = true; installCheckPhase = "$out/bin/chiaki --help"; From b5a0c7466c286b852436d6aaed5826a639212641 Mon Sep 17 00:00:00 2001 From: Rouven Czerwinski Date: Wed, 30 Dec 2020 20:00:35 +0100 Subject: [PATCH 3/3] 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 22e1c31eff1f..63afec7264ce 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";