Skip to content

Commit

Permalink
SDL_mixer: Fix mod support (NixOS#365401)
Browse files Browse the repository at this point in the history
  • Loading branch information
Atemu authored Dec 24, 2024
2 parents 4af8ef3 + 3e5a787 commit 2f15fd5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pkgs/by-name/sd/SDL_mixer/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
fetchpatch,
fetchurl,
fluidsynth,
libmikmod,
libopenmpt-modplug,
libogg,
libvorbis,
pkg-config,
Expand Down Expand Up @@ -63,6 +63,12 @@ stdenv.mkDerivation (finalAttrs: {
})
];

# Fix location of modplug header
postPatch = ''
substituteInPlace music_modplug.h \
--replace-fail '#include "modplug.h"' '#include <libmodplug/modplug.h>'
'';

nativeBuildInputs = [
SDL
pkg-config
Expand All @@ -72,7 +78,7 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
SDL
fluidsynth
libmikmod
libopenmpt-modplug
libogg
libvorbis
smpeg
Expand All @@ -81,6 +87,7 @@ stdenv.mkDerivation (finalAttrs: {
configureFlags = [
(lib.enableFeature false "music-ogg-shared")
(lib.enableFeature false "music-mod-shared")
(lib.enableFeature true "music-mod-modplug")
(lib.enableFeature enableNativeMidi "music-native-midi-gpl")
(lib.enableFeature enableSdltest "sdltest")
(lib.enableFeature enableSmpegtest "smpegtest")
Expand Down

0 comments on commit 2f15fd5

Please sign in to comment.