SDL2_mixer: enable midi by default, cleanup package

Co-authored-by: Nikolay Amiantov <ab@fmap.me>
This commit is contained in:
Pavol Rusnak 2020-11-28 10:13:19 +01:00
parent 78d2aa55ef
commit ae322db745
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -1,7 +1,19 @@
{ stdenv, lib, fetchurl, autoreconfHook, pkgconfig, which
, SDL2, libogg, libvorbis, smpeg2, flac, libmodplug, opusfile, mpg123
, CoreServices, AudioUnit, AudioToolbox
, enableNativeMidi ? false, fluidsynth ? null }:
{ stdenv
, fetchurl
, pkg-config
, AudioToolbox
, AudioUnit
, CoreServices
, SDL2
, flac
, fluidsynth
, libmodplug
, libogg
, libvorbis
, mpg123
, opusfile
, smpeg2
}:
stdenv.mkDerivation rec {
pname = "SDL2_mixer";
@ -12,19 +24,37 @@ stdenv.mkDerivation rec {
sha256 = "0694vsz5bjkcdgfdra6x9fq8vpzrl8m6q96gh58df7065hw5mkxl";
};
preAutoreconf = ''
aclocal
'';
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [ autoreconfHook pkgconfig which ];
buildInputs = stdenv.lib.optionals stdenv.isDarwin [
AudioToolbox
AudioUnit
CoreServices
];
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CoreServices AudioUnit AudioToolbox ];
propagatedBuildInputs = [
SDL2
flac
fluidsynth
libmodplug
libogg
libvorbis
mpg123
opusfile
smpeg2
];
propagatedBuildInputs = [ SDL2 libogg libvorbis fluidsynth smpeg2 flac libmodplug opusfile mpg123 ];
configureFlags = [ "--disable-music-ogg-shared" ]
++ lib.optional enableNativeMidi "--enable-music-native-midi-gpl"
++ lib.optionals stdenv.isDarwin [ "--disable-sdltest" "--disable-smpegtest" ];
configureFlags = [
"--disable-music-ogg-shared"
"--disable-music-flac-shared"
"--disable-music-mod-modplug-shared"
"--disable-music-mp3-mpg123-shared"
"--disable-music-opus-shared"
"--disable-music-midi-fluidsynth-shared"
] ++ stdenv.lib.optionals stdenv.isDarwin [
"--disable-sdltest"
"--disable-smpegtest"
];
meta = with stdenv.lib; {
description = "SDL multi-channel audio mixer library";