Merge pull request #201097 from zhaofengli/cubeb-darwin
This commit is contained in:
commit
d9c288066e
|
@ -1,14 +1,28 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, alsa-lib
|
||||
, jack2
|
||||
, pulseaudio
|
||||
, libpulseaudio
|
||||
, sndio
|
||||
, speexdsp
|
||||
, lazyLoad ? true
|
||||
, AudioUnit
|
||||
, CoreAudio
|
||||
, CoreServices
|
||||
, lazyLoad ? !stdenv.isDarwin
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
assert lib.assertMsg (stdenv.isDarwin -> !lazyLoad) "cubeb: lazyLoad is inert on Darwin";
|
||||
|
||||
let
|
||||
backendLibs = [
|
||||
alsa-lib
|
||||
jack2
|
||||
libpulseaudio
|
||||
sndio
|
||||
];
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "cubeb";
|
||||
version = "unstable-2022-10-18";
|
||||
|
||||
|
@ -24,12 +38,10 @@ stdenv.mkDerivation {
|
|||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
jack2
|
||||
pulseaudio
|
||||
sndio
|
||||
speexdsp
|
||||
];
|
||||
buildInputs = [ speexdsp ] ++ (
|
||||
if stdenv.isDarwin then [ AudioUnit CoreAudio CoreServices ]
|
||||
else backendLibs
|
||||
);
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
|
@ -43,14 +55,14 @@ stdenv.mkDerivation {
|
|||
|
||||
passthru = {
|
||||
# For downstream users when lazyLoad is true
|
||||
backendLibs = [ jack2 pulseaudio sndio speexdsp ];
|
||||
backendLibs = lib.optionals lazyLoad backendLibs;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cross platform audio library";
|
||||
homepage = "https://github.com/mozilla/cubeb";
|
||||
license = licenses.isc;
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ zhaofengli ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -18771,7 +18771,9 @@ with pkgs;
|
|||
};
|
||||
});
|
||||
|
||||
cubeb = callPackage ../development/libraries/audio/cubeb { };
|
||||
cubeb = callPackage ../development/libraries/audio/cubeb {
|
||||
inherit (darwin.apple_sdk.frameworks) AudioUnit CoreAudio CoreServices;
|
||||
};
|
||||
|
||||
hercules-ci-agent = callPackage ../development/tools/continuous-integration/hercules-ci-agent { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue