diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/os-specific/linux/bluez | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux/bluez')
-rw-r--r-- | nixpkgs/pkgs/os-specific/linux/bluez/bluez-5.37-obexd_without_systemd-1.patch | 61 | ||||
-rw-r--r-- | nixpkgs/pkgs/os-specific/linux/bluez/default.nix | 96 |
2 files changed, 157 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/bluez/bluez-5.37-obexd_without_systemd-1.patch b/nixpkgs/pkgs/os-specific/linux/bluez/bluez-5.37-obexd_without_systemd-1.patch new file mode 100644 index 000000000000..749787c5b3a7 --- /dev/null +++ b/nixpkgs/pkgs/os-specific/linux/bluez/bluez-5.37-obexd_without_systemd-1.patch @@ -0,0 +1,61 @@ +Submitted By: Armin K. <krejzi at email dot com> +Date: 2013-04-29 +Initial Package Version: 5.17 +Upstream Status: unknown +Origin: Arch Linux (Giovanni Campagna) +Description: Allow using obexd without systemd in the user session + +Not all sessions run systemd --user (actually, the majority +doesn't), so the dbus daemon must be able to spawn obexd +directly, and to do so it needs the full path of the daemon. +--- + Makefile.obexd | 4 ++-- + obexd/src/org.bluez.obex.service | 4 ---- + obexd/src/org.bluez.obex.service.in | 4 ++++ + 3 files changed, 6 insertions(+), 6 deletions(-) + delete mode 100644 obexd/src/org.bluez.obex.service + create mode 100644 obexd/src/org.bluez.obex.service.in + +diff --git a/Makefile.obexd b/Makefile.obexd +index 3760867..142e7c3 100644 +--- a/Makefile.obexd ++++ b/Makefile.obexd +@@ -2,12 +2,12 @@ + if SYSTEMD + systemduserunitdir = @SYSTEMD_USERUNITDIR@ + systemduserunit_DATA = obexd/src/obex.service ++endif + + dbussessionbusdir = @DBUS_SESSIONBUSDIR@ + dbussessionbus_DATA = obexd/src/org.bluez.obex.service +-endif + +-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service ++EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in + + obex_plugindir = $(libdir)/obex/plugins + +diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service +deleted file mode 100644 +index a538088..0000000 +--- a/obexd/src/org.bluez.obex.service ++++ /dev/null +@@ -1,4 +0,0 @@ +-[D-BUS Service] +-Name=org.bluez.obex +-Exec=/bin/false +-SystemdService=dbus-org.bluez.obex.service +diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in +new file mode 100644 +index 0000000..9c815f2 +--- /dev/null ++++ b/obexd/src/org.bluez.obex.service.in +@@ -0,0 +1,4 @@ ++[D-BUS Service] ++Name=org.bluez.obex ++Exec=@libexecdir@/obexd ++SystemdService=dbus-org.bluez.obex.service +-- +1.8.3.1 + + diff --git a/nixpkgs/pkgs/os-specific/linux/bluez/default.nix b/nixpkgs/pkgs/os-specific/linux/bluez/default.nix new file mode 100644 index 000000000000..a917175b90ce --- /dev/null +++ b/nixpkgs/pkgs/os-specific/linux/bluez/default.nix @@ -0,0 +1,96 @@ +{ stdenv, fetchurl, pkgconfig, dbus, glib, alsaLib, + python3, readline, udev, libical, systemd, + enableWiimote ? false, enableMidi ? false, enableSixaxis ? false }: + +stdenv.mkDerivation rec { + name = "bluez-5.50"; + + src = fetchurl { + url = "mirror://kernel/linux/bluetooth/${name}.tar.xz"; + sha256 = "048r91vx9gs5nwwbah2s0xig04nwk14c5s0vb7qmaqdvighsmz2z"; + }; + + pythonPath = with python3.pkgs; [ + dbus-python pygobject2 pygobject3 recursivePthLoader + ]; + + buildInputs = [ + dbus glib alsaLib python3 python3.pkgs.wrapPython + readline udev libical + ]; + + nativeBuildInputs = [ pkgconfig ]; + + outputs = [ "out" "dev" "test" ]; + + patches = [ ./bluez-5.37-obexd_without_systemd-1.patch ]; + + postConfigure = '' + substituteInPlace tools/hid2hci.rules \ + --replace /sbin/udevadm ${systemd}/bin/udevadm \ + --replace "hid2hci " "$out/lib/udev/hid2hci " + ''; + + configureFlags = (with stdenv.lib; [ + "--localstatedir=/var" + "--enable-library" + "--enable-cups" + "--enable-pie" + "--with-dbusconfdir=$(out)/etc" + "--with-dbussystembusdir=$(out)/share/dbus-1/system-services" + "--with-dbussessionbusdir=$(out)/share/dbus-1/services" + "--with-systemdsystemunitdir=$(out)/etc/systemd/system" + "--with-systemduserunitdir=$(out)/etc/systemd/user" + "--with-udevdir=$(out)/lib/udev" + ] ++ optional enableWiimote [ "--enable-wiimote" ] + ++ optional enableMidi [ "--enable-midi" ] + ++ optional enableSixaxis [ "--enable-sixaxis" ]); + + # Work around `make install' trying to create /var/lib/bluetooth. + installFlags = "statedir=$(TMPDIR)/var/lib/bluetooth"; + + makeFlags = "rulesdir=$(out)/lib/udev/rules.d"; + + postInstall = '' + mkdir -p $test/{bin,test} + cp -a test $test + pushd $test/test + for a in \ + simple-agent \ + test-adapter \ + test-device \ + test-thermometer \ + list-devices \ + monitor-bluetooth \ + ; do + ln -s ../test/$a $test/bin/bluez-$a + done + popd + wrapPythonProgramsIn $test/test "$test/test $pythonPath" + + # for bluez4 compatibility for NixOS + mkdir $out/sbin + ln -s ../libexec/bluetooth/bluetoothd $out/sbin/bluetoothd + ln -s ../libexec/bluetooth/obexd $out/sbin/obexd + + # Add extra configuration + mkdir $out/etc/bluetooth + ln -s /etc/bluetooth/main.conf $out/etc/bluetooth/main.conf + + # Add missing tools, ref https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/bluez + for files in `find tools/ -type f -perm -755`; do + filename=$(basename $files) + install -Dm755 tools/$filename $out/bin/$filename + done + ''; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "Bluetooth support for Linux"; + homepage = http://www.bluez.org/; + license = with licenses; [ gpl2 lgpl21 ]; + platforms = platforms.linux; + repositories.git = https://git.kernel.org/pub/scm/bluetooth/bluez.git; + }; +} |