15 inherit (darwin.apple_sdk.frameworks)
20 stdenv.mkDerivation rec {
24 src = fetchFromGitHub {
28 hash = "sha256-N2znqy58tMHgYa07vEsSedWLRhoJzDoINcsUu0UYLnA=";
33 # https://github.com/icculus/SDL_sound/pull/32 - fix build on darwin
34 # can be dropped on the next update
35 url = "https://github.com/icculus/SDL_sound/commit/c15d75b7720113b28639baad284f45f943846294.patch";
36 hash = "sha256-4GL8unsZ7eNkzjLXq9QdaxFQMzX2tdP0cBR1jTaRLc0=";
40 nativeBuildInputs = [ cmake ];
42 cmakeFlags = [ "-DSDLSOUND_DECODER_MIDI=1" ];
44 buildInputs = [ SDL2 flac libmikmod libvorbis timidity ]
45 ++ lib.optionals stdenv.hostPlatform.isDarwin [ AudioToolbox CoreAudio ];
48 description = "SDL2 sound library";
49 mainProgram = "playsound";
50 platforms = platforms.unix;
51 license = licenses.zlib;
52 homepage = "https://www.icculus.org/SDL_sound/";