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
82 lines
1.9 KiB
Nix
82 lines
1.9 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
testers,
|
|
|
|
cmake,
|
|
ninja,
|
|
|
|
alsa-lib,
|
|
libjack2,
|
|
libpulseaudio,
|
|
libvorbis,
|
|
opusfile,
|
|
sndio,
|
|
|
|
alsaSupport ? true,
|
|
pulseSupport ? true,
|
|
jackSupport ? true,
|
|
sndioSupport ? true,
|
|
}:
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "miniaudio";
|
|
version = "0.11.23";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mackron";
|
|
repo = "miniaudio";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-ZrfKw5a3AtIER2btCKWhuvygasNaHNf9EURf1Kv96Vc=";
|
|
};
|
|
|
|
outputs = [
|
|
"out"
|
|
"dev"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
ninja
|
|
];
|
|
|
|
buildInputs = [
|
|
libvorbis
|
|
opusfile
|
|
]
|
|
++ lib.optional pulseSupport libpulseaudio
|
|
++ lib.optional jackSupport libjack2
|
|
++ lib.optional alsaSupport alsa-lib
|
|
++ lib.optional sndioSupport sndio;
|
|
|
|
cmakeFlags = [
|
|
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
|
|
(lib.cmakeBool "MINIAUDIO_NO_RUNTIME_LINKING" true)
|
|
(lib.cmakeBool "MINIAUDIO_BUILD_TESTS" true)
|
|
(lib.cmakeBool "MINIAUDIO_BUILD_EXAMPLES" true)
|
|
|
|
(lib.cmakeBool "MINIAUDIO_ENABLE_ONLY_SPECIFIC_BACKENDS" true)
|
|
(lib.cmakeBool "MINIAUDIO_ENABLE_PULSEAUDIO" pulseSupport)
|
|
(lib.cmakeBool "MINIAUDIO_ENABLE_JACK" jackSupport)
|
|
(lib.cmakeBool "MINIAUDIO_ENABLE_SNDIO" alsaSupport)
|
|
(lib.cmakeBool "MINIAUDIO_ENABLE_ALSA" sndioSupport)
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
|
|
meta = with lib; {
|
|
description = "Single header audio playback and capture library written in C";
|
|
homepage = "https://github.com/mackron/miniaudio";
|
|
changelog = "https://github.com/mackron/miniaudio/blob/${finalAttrs.version}/CHANGES.md";
|
|
license = with licenses; [
|
|
unlicense # or
|
|
mit0
|
|
];
|
|
maintainers = [ maintainers.jansol ];
|
|
pkgConfigModules = [ "miniaudio" ];
|
|
platforms = platforms.linux;
|
|
};
|
|
})
|