2024-01-25 14:12:00 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, pkg-config, bluez, dbus, glew, glfw, imgui, makeDesktopItem, copyDesktopItems }:
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "SonyHeadphonesClient";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "1.3.2";
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Plutoberth";
|
|
|
|
repo = "SonyHeadphonesClient";
|
|
|
|
rev = "v${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-vhI97KheKzr87exCh4xNN7NDefcagdMu1tWSt67vLiU=";
|
2022-01-03 16:56:52 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "include-cstdint-to-fix-gcc-compiling.patch";
|
|
|
|
url = "https://github.com/Plutoberth/SonyHeadphonesClient/commit/4da8a12b22f8a45e79aa53d4cae88ca99b51d41f.patch";
|
|
|
|
stripLen = 2;
|
|
|
|
extraPrefix = "";
|
|
|
|
hash = "sha256-IZR/Znj40pUEC9gmNJDMPWuZOM2ueAgykZFn5DVn6es=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config copyDesktopItems ];
|
|
|
|
buildInputs = [ bluez dbus glew glfw imgui ];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
sourceRoot = "${src.name}/Client";
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
cmakeFlags = [ "-Wno-dev" ];
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Constants.h \
|
|
|
|
--replace "UNKNOWN = -1" "// UNKNOWN removed since it doesn't fit in char"
|
|
|
|
'';
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -Dm755 -t $out/bin SonyHeadphonesClient
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "SonyHeadphonesClient";
|
|
|
|
exec = "SonyHeadphonesClient";
|
|
|
|
icon = "SonyHeadphonesClient";
|
|
|
|
desktopName = "Sony Headphones Client";
|
|
|
|
comment = "A client recreating the functionality of the Sony Headphones app";
|
|
|
|
categories = [ "Audio" "Mixer" ];
|
|
|
|
})
|
|
|
|
];
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Client recreating the functionality of the Sony Headphones app";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://github.com/Plutoberth/SonyHeadphonesClient";
|
|
|
|
license = licenses.mit;
|
2022-01-03 16:56:52 +00:00
|
|
|
maintainers = with maintainers; [ stunkymonkey ];
|
2022-05-18 14:49:53 +00:00
|
|
|
platforms = platforms.linux;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "SonyHeadphonesClient";
|
2022-01-03 16:56:52 +00:00
|
|
|
};
|
|
|
|
}
|