diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
commit | c4625b175f8200f643fd6e11010932ea44c78433 (patch) | |
tree | bce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/tools/bluetooth/bluez-alsa/default.nix | |
parent | 49f735974dd103039ddc4cb576bb76555164a9e7 (diff) | |
parent | d661aa56a8843e991261510c1bb28fdc2f6975ae (diff) |
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie
git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7
git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/tools/bluetooth/bluez-alsa/default.nix')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/tools/bluetooth/bluez-alsa/default.nix | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/bluetooth/bluez-alsa/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/bluetooth/bluez-alsa/default.nix new file mode 100644 index 000000000000..09f5471de483 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/tools/bluetooth/bluez-alsa/default.nix @@ -0,0 +1,68 @@ +{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook +, alsaLib, bluez, glib, sbc, dbus + +# optional, but useful utils +, readline, libbsd, ncurses + +# optional codecs +, aacSupport ? true, fdk_aac +# TODO: aptxSupport +}: + +with stdenv.lib; + +stdenv.mkDerivation rec { + pname = "bluez-alsa"; + version = "2.1.0"; + + src = fetchFromGitHub { + owner = "Arkq"; + repo = "bluez-alsa"; + rev = "v${version}"; + sha256 = "112dfqxc144a61jqil2s3181gngfw5vz7yy10ml4f5a1nd90qnci"; + }; + + nativeBuildInputs = [ pkgconfig autoreconfHook ]; + + buildInputs = [ + alsaLib bluez glib sbc dbus + readline libbsd ncurses + ] + ++ optional aacSupport fdk_aac; + + configureFlags = [ + "--with-alsaplugindir=${placeholder "out"}/lib/alsa-lib" + "--with-dbusconfdir=${placeholder "out"}/share/dbus-1/system.d" + "--enable-rfcomm" + "--enable-hcitop" + ] + ++ optional aacSupport "--enable-aac"; + + meta = { + description = "Bluez 5 Bluetooth Audio ALSA Backend"; + longDescription = '' + Bluez-ALSA (BlueALSA) is an ALSA backend for Bluez 5 audio interface. + Bluez-ALSA registers all Bluetooth devices with audio profiles in Bluez + under a virtual ALSA PCM device called `bluealsa` that supports both + playback and capture. + + Some backstory: Bluez 5 removed built-in support for ALSA in favor of a + generic interface for 3rd party appliations. Thereafter, PulseAudio + implemented a backend for that interface and became the only way to get + Bluetooth audio with Bluez 5. Users prefering ALSA stayed on Bluez 4. + However, Bluez 4 eventually became deprecated. + + This package is a rebirth of a direct interface between ALSA and Bluez 5, + that, unlike PulseAudio, provides KISS near-metal-like experience. It is + not possible to run BluezALSA and PulseAudio Bluetooth at the same time + due to limitations in Bluez, but it is possible to run PulseAudio over + BluezALSA if you disable `bluetooth-discover` and `bluez5-discover` + modules in PA and configure it to play/capture sound over `bluealsa` PCM. + ''; + homepage = src.meta.homepage; + license = licenses.mit; + platforms = platforms.linux; + maintainers = [ maintainers.oxij maintainers.lheckemann ]; + }; + +} |