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.

+47 -18
+44
pkgs/by-name/bl/bluez-headers/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchurl, 5 + }: 6 + 7 + # This package only provides the bluetooth headers from the bluez package 8 + # for consumption in Python, which cannot consume bluez.dev due to multiple 9 + # infinite recursion paths. 10 + 11 + stdenv.mkDerivation (finalAttrs: { 12 + pname = "bluez-headers"; 13 + version = "5.83"; 14 + 15 + # This package has the source, because of the emulatorAvailable check in the 16 + # bluez function args, that causes an infinite recursion with Python on cross 17 + # builds. 18 + src = fetchurl { 19 + url = "mirror://kernel/linux/bluetooth/bluez-${finalAttrs.version}.tar.xz"; 20 + hash = "sha256-EIUi2QnSIFgTmb/sk9qrYgNVOc7vPdo+eZcHhcY70kw="; 21 + }; 22 + 23 + dontConfigure = true; 24 + dontBuild = true; 25 + 26 + installPhase = '' 27 + mkdir -p $out/include/bluetooth 28 + cp -v lib/*.h "$out/include/bluetooth/" 29 + ''; 30 + 31 + meta = { 32 + homepage = "https://www.bluez.org/"; 33 + description = "Official Linux Bluetooth protocol stack"; 34 + changelog = "https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/ChangeLog?h=${finalAttrs.version}"; 35 + license = with lib.licenses; [ 36 + bsd2 37 + gpl2Plus 38 + lgpl21Plus 39 + mit 40 + ]; 41 + maintainers = with lib.maintainers; [ ]; 42 + platforms = lib.platforms.linux; 43 + }; 44 + })
+3 -18
pkgs/by-name/bl/bluez/package.nix
··· 3 3 stdenv, 4 4 alsa-lib, 5 5 autoreconfHook, 6 + bluez-headers, 6 7 dbus, 7 8 docutils, 8 9 ell, ··· 28 29 29 30 stdenv.mkDerivation (finalAttrs: { 30 31 pname = "bluez"; 31 - version = "5.83"; 32 - 33 - src = fetchurl { 34 - url = "mirror://kernel/linux/bluetooth/bluez-${finalAttrs.version}.tar.xz"; 35 - hash = "sha256-EIUi2QnSIFgTmb/sk9qrYgNVOc7vPdo+eZcHhcY70kw="; 36 - }; 32 + inherit (bluez-headers) version src; 37 33 38 34 patches = [ 39 35 (fetchurl { ··· 186 182 url = "https://git.kernel.org/pub/scm/bluetooth/bluez.git"; 187 183 }; 188 184 189 - meta = { 190 - homepage = "https://www.bluez.org/"; 191 - description = "Official Linux Bluetooth protocol stack"; 192 - changelog = "https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/ChangeLog?h=${finalAttrs.version}"; 193 - license = with lib.licenses; [ 194 - bsd2 195 - gpl2Plus 196 - lgpl21Plus 197 - mit 198 - ]; 185 + meta = bluez-headers.meta // { 199 186 mainProgram = "btinfo"; 200 - maintainers = with lib.maintainers; [ ]; 201 - platforms = lib.platforms.linux; 202 187 }; 203 188 })