summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2023-11-03 22:15:04 +0000
committerSergei Trofimovich <slyich@gmail.com>2023-11-03 22:15:04 +0000
commitb5750fef58d69921f8522b77cc05998c8dad8ac2 (patch)
tree4afbb5e2b18b30f6b9cd5bbe06c6e21009bf7d81
parent3c43b804d4b6811cbafbe506113f12e45a13e19d (diff)
downloadnixpkgs-b5750fef58d69921f8522b77cc05998c8dad8ac2.tar
nixpkgs-b5750fef58d69921f8522b77cc05998c8dad8ac2.tar.gz
nixpkgs-b5750fef58d69921f8522b77cc05998c8dad8ac2.tar.bz2
nixpkgs-b5750fef58d69921f8522b77cc05998c8dad8ac2.tar.lz
nixpkgs-b5750fef58d69921f8522b77cc05998c8dad8ac2.tar.xz
nixpkgs-b5750fef58d69921f8522b77cc05998c8dad8ac2.tar.zst
nixpkgs-b5750fef58d69921f8522b77cc05998c8dad8ac2.zip
deadbeef: fix build against clang-16
Without the change build fails as https://cache.nixos.org/log/848ky6rxa8v0wzy72gyrv15v7my7f22c-deadbeef-1.9.5.drv

    libbinio/binio.cpp:498:3: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      register long bits;

The change allies the fix similar to upstream fix from https://github.com/DeaDBeeF-Player/deadbeef/issues/3012
but without the patch conflict.
-rw-r--r--pkgs/applications/audio/deadbeef/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/applications/audio/deadbeef/default.nix b/pkgs/applications/audio/deadbeef/default.nix
index 34b4b7ab188..f2627d65ff5 100644
--- a/pkgs/applications/audio/deadbeef/default.nix
+++ b/pkgs/applications/audio/deadbeef/default.nix
@@ -121,6 +121,13 @@ in clangStdenv.mkDerivation {
     ./autogen.sh
   '';
 
+  postPatch = ''
+    # Fix the build on c++17 compiler:
+    #   https://github.com/DeaDBeeF-Player/deadbeef/issues/3012
+    # TODO: remove after 1.9.5 release.
+    substituteInPlace plugins/adplug/Makefile.am --replace 'adplug_la_CXXFLAGS = ' 'adplug_la_CXXFLAGS = -std=c++11 '
+  '';
+
   meta = with lib; {
     description = "Ultimate Music Player for GNU/Linux";
     homepage = "http://deadbeef.sourceforge.net/";