summary refs log tree commit diff
path: root/pkgs/applications/video/hyperion-ng/default.nix
blob: 9bee8715b98d08497a9edce2f0e0336c7f44fd06 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{ avahi-compat, cmake, fetchFromGitHub, flatbuffers, hidapi, lib, libcec
, libusb1, libX11, libxcb, libXrandr, mbedtls, mkDerivation, protobuf, python3
, qtbase, qtserialport, qtsvg, qtx11extras, wrapQtAppsHook }:

mkDerivation rec {
  pname = "hyperion.ng";
  version = "2.0.12";

  src = fetchFromGitHub {
    owner = "hyperion-project";
    repo = pname;
    rev = version;
    sha256 = "sha256-J31QaWwGNhIpnZmWN9lZEI6fC0VheY5X8fGchQqtAlQ=";
  };

  buildInputs = [
    avahi-compat
    flatbuffers
    hidapi
    libcec
    libusb1
    libX11
    libxcb
    libXrandr
    mbedtls
    protobuf
    python3
    qtbase
    qtserialport
    qtsvg
    qtx11extras
  ];

  nativeBuildInputs = [ cmake wrapQtAppsHook ];

  cmakeFlags = [
    "-DCMAKE_BUILD_TYPE=Release"
    "-DUSE_SYSTEM_MBEDTLS_LIBS=ON"
    "-DUSE_SYSTEM_FLATBUFFERS_LIBS=ON"
    "-DUSE_SYSTEM_PROTO_LIBS=ON"
  ];

  meta = with lib; {
    description = "Open Source Ambilight solution";
    homepage = "https://github.com/hyperion-project/hyperion.ng";
    license = licenses.mit;
    maintainers = with maintainers; [ algram ];
    platforms = platforms.unix;
  };
}