From 9db1e83c07dd7006889deb839ceb83e8b0102101 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Tue, 5 Sep 2023 18:57:08 -0400 Subject: [PATCH] libmodplug: fix build with clang 16 Remove usage of the register storage class, which is not allowed in C++17 (the default for clang 16). --- pkgs/development/libraries/libmodplug/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/libraries/libmodplug/default.nix b/pkgs/development/libraries/libmodplug/default.nix index 69c36dc718cb..334dfa9d8015 100644 --- a/pkgs/development/libraries/libmodplug/default.nix +++ b/pkgs/development/libraries/libmodplug/default.nix @@ -9,6 +9,11 @@ stdenv.mkDerivation rec { sha256 = "1pnri98a603xk47smnxr551svbmgbzcw018mq1k6srbrq6kaaz25"; }; + # Unfortunately, upstream appears inactive and the patches from the fork don’t apply cleanly. + # Modify `src/fastmix.cpp` to remove usage of the register storage class, which is + # not allowed in C++17 and is an error in clang 16. + prePatch = "substituteInPlace src/fastmix.cpp --replace 'register ' ''"; + outputs = [ "out" "dev" ]; preConfigure = ''