blob: d0a875516fa34c85d6133d56d72cef2da519cfe2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
{ stdenv, fetchurl, pkgconfig, dbus, glib, libusb, alsaLib, pythonPackages, makeWrapper
, readline, libsndfile }:
assert stdenv.isLinux;
let
inherit (pythonPackages) python;
pythonpath = "${pythonPackages.dbus-python}/lib/${python.libPrefix}/site-packages:"
+ "${pythonPackages.pygobject2}/lib/${python.libPrefix}/site-packages";
in stdenv.mkDerivation rec {
name = "bluez-4.101";
src = fetchurl {
url = "mirror://kernel/linux/bluetooth/${name}.tar.gz";
sha256 = "11vldy255zkmmpj0g0a1m6dy9bzsmyd7vxy02cdfdw79ml888wsr";
};
buildInputs =
[ pkgconfig dbus glib libusb alsaLib python makeWrapper
readline libsndfile
# Disables GStreamer; not clear what it gains us other than a
# zillion extra dependencies.
# gstreamer gst_plugins_base
];
configureFlags = [
"--localstatedir=/var"
"--enable-cups"
"--with-systemdunitdir=$(out)/etc/systemd/system"
];
# Work around `make install' trying to create /var/lib/bluetooth.
installFlags = "statedir=$(TMPDIR)/var/lib/bluetooth";
makeFlags = "rulesdir=$(out)/lib/udev/rules.d";
/* !!! Move these into a separate package to prevent Bluez from
depending on Python etc. */
postInstall = ''
pushd test
for a in simple-agent test-adapter test-device test-input; do
cp $a $out/bin/bluez-$a
wrapProgram $out/bin/bluez-$a --prefix PYTHONPATH : ${pythonpath}
done
popd
'';
meta = {
homepage = http://www.bluez.org/;
description = "Bluetooth support for Linux";
platforms = stdenv.lib.platforms.linux;
};
}
|