diff --git a/pkgs/os-specific/linux/bluez/default.nix b/pkgs/os-specific/linux/bluez/default.nix index 1f6fb31d93db..1d93174ec65d 100644 --- a/pkgs/os-specific/linux/bluez/default.nix +++ b/pkgs/os-specific/linux/bluez/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchurl +, fetchpatch , alsa-lib , dbus , ell @@ -49,6 +50,17 @@ in stdenv.mkDerivation rec { outputs = [ "out" "dev" ] ++ lib.optional doCheck "test"; + patches = [ + # https://github.com/bluez/bluez/commit/0905a06410d4a5189f0be81e25eb3c3e8a2199c5 + # which fixes https://github.com/bluez/bluez/issues/329 + # and is already merged upstream and not yet in a release. + (fetchpatch { + name = "StateDirectory_and_ConfigurationDirectory.patch"; + url = "https://github.com/bluez/bluez/commit/0905a06410d4a5189f0be81e25eb3c3e8a2199c5.patch"; + sha256 = "sha256-MI6yPTiDLHsSTjLvNqtWnuy2xUMYpSat1WhMbeoedSM="; + }) + ]; + postPatch = '' substituteInPlace tools/hid2hci.rules \ --replace /sbin/udevadm ${systemd}/bin/udevadm \