Files
nixpkgs/pkgs/by-name/bl/bluez-headers/package.nix
2026-08-11 14:09:42 +02:00

54 lines
1.3 KiB
Nix

{
lib,
stdenv,
fetchurl,
bluez,
}:
# 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.87";
# 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-Jr3PLOvXMQxvWYhQYGsDfvDFFf5mCOvFTSLFDEwys18=";
};
dontConfigure = true;
dontBuild = true;
strictDeps = true;
installPhase = ''
mkdir -p $out/include/
cp -rv lib/* "$out/include/"
'';
passthru.tests = {
inherit bluez; # inherits bluez-headers.src
};
__structuredAttrs = true;
meta = {
homepage = "https://bluez.github.io/";
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 = [ ];
platforms = lib.platforms.linux;
};
})