nixpkgs/pkgs/by-name/hy/hyperhdr/package.nix

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

101 lines
2 KiB
Nix
Raw Normal View History

2024-04-23 18:26:51 +02:00
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
alsa-lib,
flatbuffers,
libjpeg_turbo,
mbedtls,
mdns,
pipewire,
qt6Packages,
qmqtt,
xz,
2025-04-15 21:52:19 +02:00
sdbus-cpp_2,
2025-04-29 08:59:05 +02:00
plutovg,
lunasvg,
nanopb,
linalg,
stb,
2024-04-23 18:26:51 +02:00
}:
let
inherit (lib)
cmakeBool
;
in
stdenv.mkDerivation rec {
pname = "hyperhdr";
2025-04-15 21:52:19 +02:00
version = "21.0.0.0";
2024-04-23 18:26:51 +02:00
src = fetchFromGitHub {
owner = "awawa-dev";
repo = "HyperHDR";
tag = "v${version}";
2025-04-29 08:59:05 +02:00
hash = "sha256-CSggawgUPkpeADc8VXs5FA+ubZAtrtTu0qYgIWA0V/c=";
2024-04-23 18:26:51 +02:00
};
nativeBuildInputs = [
cmake
pkg-config
qt6Packages.wrapQtAppsHook
];
2025-04-15 21:52:19 +02:00
patches = [
2025-06-02 15:54:57 +02:00
# Allow completely unvendoring hyperhdr
2025-04-29 08:59:05 +02:00
# This can be removed on the next hyperhdr release
./unvendor.patch
2025-04-15 21:52:19 +02:00
];
2025-04-29 08:59:18 +02:00
postPatch = ''
substituteInPlace sources/sound-capture/linux/SoundCaptureLinux.cpp \
--replace-fail "libasound.so.2" "${lib.getLib alsa-lib}/lib/libasound.so.2"
'';
2024-04-23 18:26:51 +02:00
cmakeFlags = [
"-DPLATFORM=linux"
(cmakeBool "USE_SYSTEM_FLATBUFFERS_LIBS" true)
2025-04-29 08:59:05 +02:00
(cmakeBool "USE_SYSTEM_LUNASVG_LIBS" true)
2024-04-23 18:26:51 +02:00
(cmakeBool "USE_SYSTEM_MBEDTLS_LIBS" true)
2025-04-29 08:59:05 +02:00
(cmakeBool "USE_SYSTEM_MQTT_LIBS" true)
(cmakeBool "USE_SYSTEM_NANOPB_LIBS" true)
(cmakeBool "USE_SYSTEM_SDBUS_CPP_LIBS" true)
(cmakeBool "USE_SYSTEM_STB_LIBS" true)
2024-04-23 18:26:51 +02:00
];
buildInputs = [
alsa-lib
flatbuffers
libjpeg_turbo
2025-04-29 08:59:05 +02:00
linalg
lunasvg
2024-04-23 18:26:51 +02:00
mbedtls
2025-04-29 08:59:05 +02:00
mdns
nanopb
2024-04-23 18:26:51 +02:00
pipewire
2025-04-29 08:59:05 +02:00
plutovg
2024-04-23 18:26:51 +02:00
qmqtt
qt6Packages.qtbase
qt6Packages.qtserialport
2025-04-15 21:52:19 +02:00
sdbus-cpp_2
2025-04-29 08:59:05 +02:00
stb
xz
2024-04-23 18:26:51 +02:00
];
meta = with lib; {
description = "Highly optimized open source ambient lighting implementation based on modern digital video and audio stream analysis for Windows, macOS and Linux (x86 and Raspberry Pi / ARM";
homepage = "https://github.com/awawa-dev/HyperHDR";
changelog = "https://github.com/awawa-dev/HyperHDR/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
2025-04-29 08:59:27 +02:00
maintainers = with maintainers; [
hexa
eymeric
];
2024-04-23 18:26:51 +02:00
mainProgram = "hyperhdr";
platforms = platforms.linux;
};
}