Files
nixpkgs/pkgs/by-name/cu/cubeb/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

86 lines
2.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
unstableGitUpdater,
cmake,
pkg-config,
alsa-lib,
jack2,
libpulseaudio,
sndio,
speexdsp,
validatePkgConfig,
# passthru.tests
testers,
alsaSupport ? !stdenv.hostPlatform.isDarwin,
pulseSupport ? !stdenv.hostPlatform.isDarwin,
jackSupport ? !stdenv.hostPlatform.isDarwin,
sndioSupport ? !stdenv.hostPlatform.isDarwin,
enableShared ? !stdenv.hostPlatform.isStatic,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "cubeb";
version = "0-unstable-2025-09-17";
src = fetchFromGitHub {
owner = "mozilla";
repo = "cubeb";
rev = "e495bee4cd630c9f99907a764e16edba37a4b564";
hash = "sha256-iBxYZppjJhFAwGi9v4/lTsyqC9Gy04Dc7bJNzgv18rE=";
};
outputs = [
"out"
"lib"
"dev"
];
nativeBuildInputs = [
cmake
pkg-config
validatePkgConfig
];
buildInputs = [
speexdsp
]
# In the default configuration these inputs are lazy-loaded. If your package builds a vendored cubeb please make
# sure to include these in the runtime LD path.
++ lib.optional alsaSupport alsa-lib
++ lib.optional jackSupport jack2
++ lib.optional pulseSupport libpulseaudio
++ lib.optional sndioSupport sndio;
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" enableShared)
(lib.cmakeBool "BUILD_TESTS" false) # tests require an audio server
(lib.cmakeBool "BUNDLE_SPEEX" false)
(lib.cmakeBool "USE_SANITIZERS" false)
# Whether to lazily load libraries with dlopen()
(lib.cmakeBool "LAZY_LOAD_LIBS" false)
];
passthru = {
updateScript = unstableGitUpdater { hardcodeZeroVersion = true; };
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
meta = {
description = "Cross platform audio library";
mainProgram = "cubeb-test";
homepage = "https://github.com/mozilla/cubeb";
license = lib.licenses.isc;
platforms = with lib.platforms; linux ++ darwin;
maintainers = with lib.maintainers; [
zhaofengli
marcin-serwin
];
pkgConfigModules = [ "libcubeb" ];
};
})