mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 15:36:47 +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
|
{ lib
|
||||||
, alsa-lib, bluez, glib, sbc, dbus
|
, stdenv
|
||||||
|
, aacSupport ? true
|
||||||
# optional, but useful utils
|
, alsa-lib
|
||||||
, readline, libbsd, ncurses
|
, autoreconfHook
|
||||||
|
, bluez
|
||||||
# optional codecs
|
, dbus
|
||||||
, aacSupport ? true, fdk_aac
|
, fdk_aac
|
||||||
# TODO: aptxSupport
|
, fetchFromGitHub
|
||||||
|
, gitUpdater
|
||||||
|
, glib
|
||||||
|
, libbsd
|
||||||
|
, ncurses
|
||||||
|
, pkg-config
|
||||||
|
, readline
|
||||||
|
, sbc
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "bluez-alsa";
|
pname = "bluez-alsa";
|
||||||
version = "4.1.1";
|
version = "4.1.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Arkq";
|
owner = "Arkq";
|
||||||
repo = "bluez-alsa";
|
repo = "bluez-alsa";
|
||||||
rev = "v${version}";
|
rev = "v${finalAttrs.version}";
|
||||||
sha256 = "sha256-oGaYiSkOhqfjUl+mHTs3gqFcxli3cgkRtT6tbjy3ht0=";
|
hash = "sha256-oGaYiSkOhqfjUl+mHTs3gqFcxli3cgkRtT6tbjy3ht0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
nativeBuildInputs = [
|
||||||
|
autoreconfHook
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
alsa-lib bluez glib sbc dbus
|
alsa-lib
|
||||||
readline libbsd ncurses
|
bluez
|
||||||
]
|
glib
|
||||||
++ lib.optional aacSupport fdk_aac;
|
sbc
|
||||||
|
dbus
|
||||||
|
readline
|
||||||
|
libbsd
|
||||||
|
ncurses
|
||||||
|
] ++ lib.optionals aacSupport [
|
||||||
|
fdk_aac
|
||||||
|
];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-alsaplugindir=${placeholder "out"}/lib/alsa-lib"
|
(lib.enableFeature aacSupport "aac")
|
||||||
"--with-dbusconfdir=${placeholder "out"}/share/dbus-1/system.d"
|
(lib.enableFeature true "hcitop")
|
||||||
"--enable-rfcomm"
|
(lib.enableFeature true "rfcomm")
|
||||||
"--enable-hcitop"
|
(lib.withFeatureAs true "alsaplugindir" "${placeholder "out"}/lib/alsa-lib")
|
||||||
]
|
(lib.withFeatureAs true "dbusconfdir" "${placeholder "out"}/share/dbus-1/system.d")
|
||||||
++ lib.optional aacSupport "--enable-aac";
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
passthru.updateScript = gitUpdater { };
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = "https://github.com/Arkq/bluez-alsa";
|
||||||
description = "Bluez 5 Bluetooth Audio ALSA Backend";
|
description = "Bluez 5 Bluetooth Audio ALSA Backend";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Bluez-ALSA (BlueALSA) is an ALSA backend for Bluez 5 audio interface.
|
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`
|
BluezALSA if you disable `bluetooth-discover` and `bluez5-discover`
|
||||||
modules in PA and configure it to play/capture sound over `bluealsa` PCM.
|
modules in PA and configure it to play/capture sound over `bluealsa` PCM.
|
||||||
'';
|
'';
|
||||||
homepage = src.meta.homepage;
|
license = with lib.licenses; [ mit ];
|
||||||
license = licenses.mit;
|
mainProgram = "bluealsa";
|
||||||
platforms = platforms.linux;
|
maintainers = with lib.maintainers; [ AndersonTorres oxij ];
|
||||||
maintainers = [ maintainers.oxij ];
|
platforms = lib.platforms.linux;
|
||||||
};
|
};
|
||||||
|
})
|
||||||
}
|
# TODO: aptxSupport
|
||||||
|
Loading…
Reference in New Issue
Block a user