diff --git a/pkgs/applications/audio/sony-headphones-client/default.nix b/pkgs/applications/audio/sony-headphones-client/default.nix index e3e6573c432..127b2a5b1a9 100644 --- a/pkgs/applications/audio/sony-headphones-client/default.nix +++ b/pkgs/applications/audio/sony-headphones-client/default.nix @@ -19,26 +19,35 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-Wno-dev" ]; + patches = [ ./gcc.patch ]; + + postPatch = '' + substituteInPlace Constants.h \ + --replace "UNKNOWN = -1" "// UNKNOWN removed since it doesn't fit in char" + ''; + installPhase = '' runHook preInstall install -Dm755 -t $out/bin SonyHeadphonesClient runHook postInstall ''; - 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" ]; - }) ]; + 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" ]; + }) + ]; meta = with lib; { description = "A client recreating the functionality of the Sony Headphones app"; - homepage = "https://github.com/Plutoberth/SonyHeadphonesClient"; - license = licenses.mit; + homepage = "https://github.com/Plutoberth/SonyHeadphonesClient"; + license = licenses.mit; maintainers = with maintainers; [ stunkymonkey ]; - platforms = platforms.linux; + platforms = platforms.linux; }; } diff --git a/pkgs/applications/audio/sony-headphones-client/gcc.patch b/pkgs/applications/audio/sony-headphones-client/gcc.patch new file mode 100644 index 00000000000..31050e4789e --- /dev/null +++ b/pkgs/applications/audio/sony-headphones-client/gcc.patch @@ -0,0 +1,19 @@ +diff --git a/SingleInstanceFuture.h b/SingleInstanceFuture.h +index 8af733f..d2e6c49 100644 +--- a/SingleInstanceFuture.h ++++ b/SingleInstanceFuture.h +@@ -12,13 +12,13 @@ template + class SingleInstanceFuture : public std::future + { + public: +- SingleInstanceFuture() = default; ++ SingleInstanceFuture(void) = default; + template + void setFromAsync(Func func, Args&&... args) noexcept(false); + bool ready(); + + private: +- SingleInstanceFuture(std::future other); ++ SingleInstanceFuture(std::future other); + SingleInstanceFuture operator=(std::future& other); + };