bluez-headers: expose bluez header files
This escapes infinite recursion, because Python cannot depend on bluez due to infinite recursion on multiple paths. But it only wants bluetooth.h at build time, so this is sufficient. In 5.84 the source path changes from lib/ to lib/bluetooth, which will require an update to the install phase.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
}:
|
||||
|
||||
# This package only provides the bluetooth headers from the bluez package
|
||||
# for consumption in Python, which cannot consume bluez.dev due to multiple
|
||||
# infinite recursion paths.
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "bluez-headers";
|
||||
version = "5.83";
|
||||
|
||||
# This package has the source, because of the emulatorAvailable check in the
|
||||
# bluez function args, that causes an infinite recursion with Python on cross
|
||||
# builds.
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/bluetooth/bluez-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-EIUi2QnSIFgTmb/sk9qrYgNVOc7vPdo+eZcHhcY70kw=";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/include/bluetooth
|
||||
cp -v lib/*.h "$out/include/bluetooth/"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.bluez.org/";
|
||||
description = "Official Linux Bluetooth protocol stack";
|
||||
changelog = "https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/ChangeLog?h=${finalAttrs.version}";
|
||||
license = with lib.licenses; [
|
||||
bsd2
|
||||
gpl2Plus
|
||||
lgpl21Plus
|
||||
mit
|
||||
];
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
@@ -3,6 +3,7 @@
|
||||
stdenv,
|
||||
alsa-lib,
|
||||
autoreconfHook,
|
||||
bluez-headers,
|
||||
dbus,
|
||||
docutils,
|
||||
ell,
|
||||
@@ -28,12 +29,7 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "bluez";
|
||||
version = "5.83";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/bluetooth/bluez-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-EIUi2QnSIFgTmb/sk9qrYgNVOc7vPdo+eZcHhcY70kw=";
|
||||
};
|
||||
inherit (bluez-headers) version src;
|
||||
|
||||
patches = [
|
||||
(fetchurl {
|
||||
@@ -186,18 +182,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
url = "https://git.kernel.org/pub/scm/bluetooth/bluez.git";
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.bluez.org/";
|
||||
description = "Official Linux Bluetooth protocol stack";
|
||||
changelog = "https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/ChangeLog?h=${finalAttrs.version}";
|
||||
license = with lib.licenses; [
|
||||
bsd2
|
||||
gpl2Plus
|
||||
lgpl21Plus
|
||||
mit
|
||||
];
|
||||
meta = bluez-headers.meta // {
|
||||
mainProgram = "btinfo";
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user