Merge pull request #204527 from nvmd/master+hyperion

This commit is contained in:
Artturi 2023-04-11 20:14:29 +03:00 committed by GitHub
commit 0d29297c7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 17 deletions

View file

@ -7896,6 +7896,12 @@
githubId = 1047859; githubId = 1047859;
name = "Kaz Wesley"; name = "Kaz Wesley";
}; };
kazenyuk = {
email = "kazenyuk@pm.me";
github = "nvmd";
githubId = 524492;
name = "Sergey Kazenyuk";
};
kcalvinalvin = { kcalvinalvin = {
email = "calvin@kcalvinalvin.info"; email = "calvin@kcalvinalvin.info";
github = "kcalvinalvin"; github = "kcalvinalvin";

View file

@ -1,51 +1,73 @@
{ stdenv, avahi-compat, cmake, fetchFromGitHub, flatbuffers, hidapi, lib, libcec { stdenv, lib, fetchFromGitHub
, libusb1, libX11, libxcb, libXrandr, mbedtls, mkDerivation, protobuf, python3 , cmake, wrapQtAppsHook, perl
, qtbase, qtserialport, qtsvg, qtx11extras, wrapQtAppsHook }: , flatbuffers, protobuf, mbedtls
, hidapi, libcec, libusb1
, libX11, libxcb, libXrandr, python3
, qtbase, qtserialport, qtsvg, qtx11extras
, withRPiDispmanx ? false, libraspberrypi
}:
mkDerivation rec { stdenv.mkDerivation rec {
pname = "hyperion.ng"; pname = "hyperion.ng";
version = "2.0.12"; version = "2.0.14";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "hyperion-project"; owner = "hyperion-project";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "sha256-J31QaWwGNhIpnZmWN9lZEI6fC0VheY5X8fGchQqtAlQ="; sha256 = "sha256-Y1PZ+YyPMZEX4fBpMG6IVT1gtXR9ZHlavJMCQ4KAenc=";
# needed for `dependencies/external/`:
# * rpi_ws281x` - not possible to use as a "system" lib
# * qmdnsengine - not in nixpkgs yet
fetchSubmodules = true;
}; };
buildInputs = [ buildInputs = [
avahi-compat
flatbuffers
hidapi hidapi
libcec
libusb1 libusb1
libX11 libX11
libxcb libxcb
libXrandr libXrandr
mbedtls flatbuffers
protobuf protobuf
mbedtls
python3 python3
qtbase qtbase
qtserialport qtserialport
qtsvg qtsvg
qtx11extras qtx11extras
]; ] ++ lib.optional stdenv.isLinux libcec
++ lib.optional withRPiDispmanx libraspberrypi;
nativeBuildInputs = [ cmake wrapQtAppsHook ]; nativeBuildInputs = [
cmake wrapQtAppsHook
] ++ lib.optional stdenv.isDarwin perl; # for macos bundle
patchPhase = ''
patchShebangs test/testrunner.sh
patchShebangs src/hyperiond/CMakeLists.txt
'' ;
cmakeFlags = [ cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_BUILD_TYPE=Release"
"-DUSE_SYSTEM_MBEDTLS_LIBS=ON" "-DENABLE_DEPLOY_DEPENDENCIES=OFF"
"-DUSE_SYSTEM_FLATBUFFERS_LIBS=ON" "-DUSE_SYSTEM_FLATBUFFERS_LIBS=ON"
"-DUSE_SYSTEM_PROTO_LIBS=ON" "-DUSE_SYSTEM_PROTO_LIBS=ON"
]; "-DUSE_SYSTEM_MBEDTLS_LIBS=ON"
# "-DUSE_SYSTEM_QMDNS_LIBS=ON" # qmdnsengine not in nixpkgs yet
"-DENABLE_TESTS=ON"
] ++ lib.optional (withRPiDispmanx == false) "-DENABLE_DISPMANX=OFF";
doCheck = true;
checkPhase = ''
cd ../ && ./test/testrunner.sh && cd -
'';
meta = with lib; { meta = with lib; {
broken = (stdenv.isLinux && stdenv.isAarch64); description = "An opensource Bias or Ambient Lighting implementation";
description = "Open Source Ambilight solution";
homepage = "https://github.com/hyperion-project/hyperion.ng"; homepage = "https://github.com/hyperion-project/hyperion.ng";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ algram ]; maintainers = with maintainers; [ algram kazenyuk ];
platforms = platforms.unix; platforms = platforms.unix;
}; };
} }