Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
79 lines
1.5 KiB
Nix
79 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
SDL2,
|
|
fetchFromGitHub,
|
|
flac,
|
|
fluidsynth,
|
|
libogg,
|
|
libvorbis,
|
|
mpg123,
|
|
opusfile,
|
|
pkg-config,
|
|
smpeg2,
|
|
stdenv,
|
|
timidity,
|
|
wavpack,
|
|
libxmp,
|
|
game-music-emu,
|
|
# Boolean flags
|
|
enableSdltest ? (!stdenv.hostPlatform.isDarwin),
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "SDL2_mixer";
|
|
version = "2.8.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "libsdl-org";
|
|
repo = "SDL_mixer";
|
|
rev = "release-${finalAttrs.version}";
|
|
hash = "sha256-6HOTLwGi2oSQChwHE/oNHfZpcMh8xTuwNQSpKS01bwI=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
SDL2
|
|
pkg-config
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
SDL2
|
|
flac
|
|
fluidsynth
|
|
libogg
|
|
libvorbis
|
|
mpg123
|
|
opusfile
|
|
smpeg2
|
|
wavpack
|
|
libxmp
|
|
game-music-emu
|
|
# MIDI patterns
|
|
timidity
|
|
];
|
|
|
|
outputs = [
|
|
"out"
|
|
"dev"
|
|
];
|
|
|
|
strictDeps = true;
|
|
|
|
configureFlags = [
|
|
(lib.enableFeature false "music-mod-modplug-shared")
|
|
(lib.enableFeature false "music-mp3-mpg123-shared")
|
|
(lib.enableFeature false "music-opus-shared")
|
|
(lib.enableFeature false "music-midi-fluidsynth-shared")
|
|
(lib.enableFeature enableSdltest "sdltest")
|
|
# override default path to allow MIDI files to be played
|
|
(lib.withFeatureAs true "timidity-cfg" "${timidity}/share/timidity/timidity.cfg")
|
|
];
|
|
|
|
meta = {
|
|
homepage = "https://github.com/libsdl-org/SDL_mixer";
|
|
description = "SDL multi-channel audio mixer library";
|
|
license = lib.licenses.zlib;
|
|
teams = [ lib.teams.sdl ];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|