about summary refs log tree commit diff
path: root/pkgs/applications/audio/sony-headphones-client/default.nix
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2022-05-15 12:24:50 +0200
committerFelix Buehler <account@buehler.rocks>2022-05-15 20:14:11 +0200
commitf8e9160a678b13bae619af437a5109ccf76a3c31 (patch)
treecb900544f1ae5f1d23cf44e8a835953464555082 /pkgs/applications/audio/sony-headphones-client/default.nix
parent88be12e5ddb27415e4c6c5f632695a1c46680bdf (diff)
sony-headphones-client: patch gcc-20 support
Diffstat (limited to 'pkgs/applications/audio/sony-headphones-client/default.nix')
-rw-r--r--pkgs/applications/audio/sony-headphones-client/default.nix31
1 files changed, 20 insertions, 11 deletions
diff --git a/pkgs/applications/audio/sony-headphones-client/default.nix b/pkgs/applications/audio/sony-headphones-client/default.nix
index e3e6573c43241..127b2a5b1a93e 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;
   };
 }