nixpkgs/pkgs/applications/video/hyperion-ng/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

74 lines
1.9 KiB
Nix
Raw Normal View History

2022-12-04 09:53:16 +00:00
{ stdenv, lib, fetchFromGitHub
, cmake, wrapQtAppsHook, perl
, flatbuffers, protobuf, mbedtls
2024-09-05 09:26:22 +00:00
, alsa-lib, hidapi, libcec, libusb1
2022-12-04 09:53:16 +00:00
, libX11, libxcb, libXrandr, python3
, qtbase, qtserialport, qtsvg, qtx11extras
, withRPiDispmanx ? false, libraspberrypi
}:
2022-04-16 17:50:44 +00:00
2022-12-04 09:53:16 +00:00
stdenv.mkDerivation rec {
2022-04-16 17:50:44 +00:00
pname = "hyperion.ng";
2024-09-05 09:26:22 +00:00
version = "2.0.16";
2022-04-16 17:50:44 +00:00
src = fetchFromGitHub {
owner = "hyperion-project";
repo = pname;
rev = version;
2024-09-05 09:26:22 +00:00
hash = "sha256-nQPtJw9DOKMPGI5trxZxpP+z2PYsbRKqOQEyaGzvmmA=";
2022-12-04 09:53:16 +00:00
# needed for `dependencies/external/`:
# * rpi_ws281x` - not possible to use as a "system" lib
# * qmdnsengine - not in nixpkgs yet
fetchSubmodules = true;
2022-04-16 17:50:44 +00:00
};
buildInputs = [
2024-09-05 09:26:22 +00:00
alsa-lib
2022-04-16 17:50:44 +00:00
hidapi
libusb1
libX11
libxcb
libXrandr
2022-12-04 09:53:16 +00:00
flatbuffers
2022-04-16 17:50:44 +00:00
protobuf
2022-12-04 09:53:16 +00:00
mbedtls
2022-04-16 17:50:44 +00:00
python3
qtbase
qtserialport
qtsvg
qtx11extras
2022-12-04 09:53:16 +00:00
] ++ lib.optional stdenv.hostPlatform.isLinux libcec
++ lib.optional withRPiDispmanx libraspberrypi;
2022-04-16 17:50:44 +00:00
2022-12-04 09:53:16 +00:00
nativeBuildInputs = [
cmake wrapQtAppsHook
] ++ lib.optional stdenv.hostPlatform.isDarwin perl; # for macos bundle
patchPhase = ''
patchShebangs test/testrunner.sh
patchShebangs src/hyperiond/CMakeLists.txt
'' ;
2022-04-16 17:50:44 +00:00
cmakeFlags = [
2022-12-04 09:53:16 +00:00
"-DENABLE_DEPLOY_DEPENDENCIES=OFF"
2022-04-16 17:50:44 +00:00
"-DUSE_SYSTEM_FLATBUFFERS_LIBS=ON"
"-DUSE_SYSTEM_PROTO_LIBS=ON"
2022-12-04 09:53:16 +00:00
"-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 -
'';
2022-04-16 17:50:44 +00:00
meta = with lib; {
2022-12-04 09:53:16 +00:00
description = "Opensource Bias or Ambient Lighting implementation";
2022-04-16 17:50:44 +00:00
homepage = "https://github.com/hyperion-project/hyperion.ng";
license = licenses.mit;
2022-12-04 09:53:16 +00:00
maintainers = with maintainers; [ algram kazenyuk ];
2022-04-16 17:50:44 +00:00
platforms = platforms.unix;
};
}