2021-12-14 14:31:32 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, bluez, dbus, glew, glfw, imgui, makeDesktopItem, copyDesktopItems }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "SonyHeadphonesClient";
|
2023-04-26 19:46:39 +00:00
|
|
|
version = "1.3.2";
|
2021-12-14 14:31:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Plutoberth";
|
|
|
|
repo = "SonyHeadphonesClient";
|
|
|
|
rev = "v${version}";
|
2023-04-26 19:46:39 +00:00
|
|
|
hash = "sha256-vhI97KheKzr87exCh4xNN7NDefcagdMu1tWSt67vLiU=";
|
2021-12-14 14:31:32 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config copyDesktopItems ];
|
|
|
|
buildInputs = [ bluez dbus glew glfw imgui ];
|
|
|
|
|
|
|
|
sourceRoot = "./source/Client";
|
|
|
|
|
|
|
|
cmakeFlags = [ "-Wno-dev" ];
|
|
|
|
|
2022-05-15 10:24:50 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Constants.h \
|
|
|
|
--replace "UNKNOWN = -1" "// UNKNOWN removed since it doesn't fit in char"
|
|
|
|
'';
|
|
|
|
|
2021-12-14 14:31:32 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -Dm755 -t $out/bin SonyHeadphonesClient
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2022-05-15 10:24:50 +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" ];
|
|
|
|
})
|
|
|
|
];
|
2021-12-14 14:31:32 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A client recreating the functionality of the Sony Headphones app";
|
2022-05-15 10:24:50 +00:00
|
|
|
homepage = "https://github.com/Plutoberth/SonyHeadphonesClient";
|
|
|
|
license = licenses.mit;
|
2021-12-14 14:31:32 +00:00
|
|
|
maintainers = with maintainers; [ stunkymonkey ];
|
2022-05-15 10:24:50 +00:00
|
|
|
platforms = platforms.linux;
|
2021-12-14 14:31:32 +00:00
|
|
|
};
|
|
|
|
}
|