mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-13 21:32:23 +03:00
bluez-alsa: refactor
- lists in ASCIIbetical ordering - finalAttrs design pattern - add updater script - remove nested with - set meta.mainProgram - add AndersonTorres as maintainer
This commit is contained in:
parent
dcfc878774
commit
55b99696bf
@ -1,42 +1,62 @@
|
||||
{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook
|
||||
, alsa-lib, bluez, glib, sbc, dbus
|
||||
|
||||
# optional, but useful utils
|
||||
, readline, libbsd, ncurses
|
||||
|
||||
# optional codecs
|
||||
, aacSupport ? true, fdk_aac
|
||||
# TODO: aptxSupport
|
||||
{ lib
|
||||
, stdenv
|
||||
, aacSupport ? true
|
||||
, alsa-lib
|
||||
, autoreconfHook
|
||||
, bluez
|
||||
, dbus
|
||||
, fdk_aac
|
||||
, fetchFromGitHub
|
||||
, gitUpdater
|
||||
, glib
|
||||
, libbsd
|
||||
, ncurses
|
||||
, pkg-config
|
||||
, readline
|
||||
, sbc
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "bluez-alsa";
|
||||
version = "4.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Arkq";
|
||||
repo = "bluez-alsa";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-oGaYiSkOhqfjUl+mHTs3gqFcxli3cgkRtT6tbjy3ht0=";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-oGaYiSkOhqfjUl+mHTs3gqFcxli3cgkRtT6tbjy3ht0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib bluez glib sbc dbus
|
||||
readline libbsd ncurses
|
||||
]
|
||||
++ lib.optional aacSupport fdk_aac;
|
||||
alsa-lib
|
||||
bluez
|
||||
glib
|
||||
sbc
|
||||
dbus
|
||||
readline
|
||||
libbsd
|
||||
ncurses
|
||||
] ++ lib.optionals aacSupport [
|
||||
fdk_aac
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
"--with-alsaplugindir=${placeholder "out"}/lib/alsa-lib"
|
||||
"--with-dbusconfdir=${placeholder "out"}/share/dbus-1/system.d"
|
||||
"--enable-rfcomm"
|
||||
"--enable-hcitop"
|
||||
]
|
||||
++ lib.optional aacSupport "--enable-aac";
|
||||
(lib.enableFeature aacSupport "aac")
|
||||
(lib.enableFeature true "hcitop")
|
||||
(lib.enableFeature true "rfcomm")
|
||||
(lib.withFeatureAs true "alsaplugindir" "${placeholder "out"}/lib/alsa-lib")
|
||||
(lib.withFeatureAs true "dbusconfdir" "${placeholder "out"}/share/dbus-1/system.d")
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
passthru.updateScript = gitUpdater { };
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/Arkq/bluez-alsa";
|
||||
description = "Bluez 5 Bluetooth Audio ALSA Backend";
|
||||
longDescription = ''
|
||||
Bluez-ALSA (BlueALSA) is an ALSA backend for Bluez 5 audio interface.
|
||||
@ -57,10 +77,10 @@ stdenv.mkDerivation rec {
|
||||
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 ];
|
||||
license = with lib.licenses; [ mit ];
|
||||
mainProgram = "bluealsa";
|
||||
maintainers = with lib.maintainers; [ AndersonTorres oxij ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
|
||||
}
|
||||
})
|
||||
# TODO: aptxSupport
|
||||
|
Loading…
Reference in New Issue
Block a user