From 7093810b0ca1ac88f9c3f0d0b50d70c0b04d9dac Mon Sep 17 00:00:00 2001 From: Ales Huzik Date: Wed, 7 Mar 2018 15:11:33 +1100 Subject: [PATCH 1/2] bluez: optionally enable midi support --- pkgs/os-specific/linux/bluez/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/bluez/default.nix b/pkgs/os-specific/linux/bluez/default.nix index 62c3986569d..d1499299116 100644 --- a/pkgs/os-specific/linux/bluez/default.nix +++ b/pkgs/os-specific/linux/bluez/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig, dbus, glib, alsaLib, pythonPackages, readline, udev, libical, - systemd, enableWiimote ? false }: + systemd, enableWiimote ? false, enableMidi ? false }: assert stdenv.isLinux; @@ -40,8 +40,8 @@ stdenv.mkDerivation rec { "--with-systemdsystemunitdir=$(out)/etc/systemd/system" "--with-systemduserunitdir=$(out)/etc/systemd/user" "--with-udevdir=$(out)/lib/udev" - ] ++ - stdenv.lib.optional enableWiimote [ "--enable-wiimote" ]; + ] ++ stdenv.lib.optional enableWiimote [ "--enable-wiimote" ] + ++ stdenv.lib.optional enableMidi [ "--enable-midi" ]; # Work around `make install' trying to create /var/lib/bluetooth. installFlags = "statedir=$(TMPDIR)/var/lib/bluetooth"; From 0555f247dcb9782fbb77e5896006d4ad95b3750b Mon Sep 17 00:00:00 2001 From: Ales Huzik Date: Wed, 7 Mar 2018 15:12:22 +1100 Subject: [PATCH 2/2] nixos/bluetooth: allow to specify custom bluez package --- nixos/modules/services/hardware/bluetooth.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/hardware/bluetooth.nix b/nixos/modules/services/hardware/bluetooth.nix index 4a8cd86b0b1..d7ca8a43179 100644 --- a/nixos/modules/services/hardware/bluetooth.nix +++ b/nixos/modules/services/hardware/bluetooth.nix @@ -3,8 +3,8 @@ with lib; let - bluez-bluetooth = pkgs.bluez; cfg = config.hardware.bluetooth; + bluez-bluetooth = cfg.package; in { @@ -21,6 +21,16 @@ in { description = "Whether to power up the default Bluetooth controller on boot."; }; + package = mkOption { + type = types.package; + default = pkgs.bluez; + defaultText = "pkgs.bluez"; + example = "pkgs.bluez.override { enableMidi = true; }"; + description = '' + Which BlueZ package to use. + ''; + }; + extraConfig = mkOption { type = types.lines; default = "";