From 85cccb63e6f59d8afaad78b926d2d92c68ca477e Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 14 Mar 2023 22:21:13 +0000 Subject: [PATCH] SDL2_mixer: fix path to timidity.cfg Without the change client programs like `fheroes2` fail to load `MIDI` files: $ nix run -f '' fheroes2 $ 14.03.2023 22:22:21: [ERROR] createMusic: Failed to create a music track from memory. The error: Couldn't open timidity.cfg After the change music plays as expected. It's a forward-port of the same fix that `SDL2_mixer` had in f11d1d9 ("SDl2_mixer: fix MIDI playback by adding timidity paths") --- pkgs/development/libraries/SDL2_mixer/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/SDL2_mixer/default.nix b/pkgs/development/libraries/SDL2_mixer/default.nix index dab76bdab70..b412e22b8f0 100644 --- a/pkgs/development/libraries/SDL2_mixer/default.nix +++ b/pkgs/development/libraries/SDL2_mixer/default.nix @@ -32,6 +32,9 @@ stdenv.mkDerivation rec { "--disable-music-mp3-mpg123-shared" "--disable-music-opus-shared" "--disable-music-midi-fluidsynth-shared" + + # override default path to allow MIDI files to be played + "--with-timidity-cfg=${timidity}/share/timidity/timidity.cfg" ] ++ lib.optionals stdenv.isDarwin [ "--disable-sdltest" "--disable-smpegtest"