Skip to content

Commit 2f15fd5

Browse files
authored
SDL_mixer: Fix mod support (#365401)
2 parents 4af8ef3 + 3e5a787 commit 2f15fd5

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pkgs/by-name/sd/SDL_mixer/package.nix

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
fetchpatch,
55
fetchurl,
66
fluidsynth,
7-
libmikmod,
7+
libopenmpt-modplug,
88
libogg,
99
libvorbis,
1010
pkg-config,
@@ -63,6 +63,12 @@ stdenv.mkDerivation (finalAttrs: {
6363
})
6464
];
6565

66+
# Fix location of modplug header
67+
postPatch = ''
68+
substituteInPlace music_modplug.h \
69+
--replace-fail '#include "modplug.h"' '#include <libmodplug/modplug.h>'
70+
'';
71+
6672
nativeBuildInputs = [
6773
SDL
6874
pkg-config
@@ -72,7 +78,7 @@ stdenv.mkDerivation (finalAttrs: {
7278
buildInputs = [
7379
SDL
7480
fluidsynth
75-
libmikmod
81+
libopenmpt-modplug
7682
libogg
7783
libvorbis
7884
smpeg
@@ -81,6 +87,7 @@ stdenv.mkDerivation (finalAttrs: {
8187
configureFlags = [
8288
(lib.enableFeature false "music-ogg-shared")
8389
(lib.enableFeature false "music-mod-shared")
90+
(lib.enableFeature true "music-mod-modplug")
8491
(lib.enableFeature enableNativeMidi "music-native-midi-gpl")
8592
(lib.enableFeature enableSdltest "sdltest")
8693
(lib.enableFeature enableSmpegtest "smpegtest")

0 commit comments

Comments
 (0)