2011-05-21 00:21:34 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, dbus, glib, libusb, alsaLib, python, makeWrapper
|
2011-06-07 23:48:59 +02:00
|
|
|
, pythonDBus, pygobject, gst_all, readline, libsndfile }:
|
2010-06-10 14:47:58 +02:00
|
|
|
|
2009-08-05 22:29:36 +02:00
|
|
|
assert stdenv.isLinux;
|
2011-05-21 00:21:34 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
pythonpath = "${pythonDBus}/lib/${python.libPrefix}/site-packages:"
|
|
|
|
+ "${pygobject}/lib/${python.libPrefix}/site-packages";
|
|
|
|
in
|
2009-08-05 22:29:36 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2011-09-01 12:02:56 +02:00
|
|
|
name = "bluez-4.96";
|
2009-08-05 22:29:36 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://kernel/linux/bluetooth/${name}.tar.gz";
|
2011-09-01 12:02:56 +02:00
|
|
|
sha256 = "16gshw7xgl0k3j3qgkdqmgvzqz6fdcna909ibvawl2brsw7xavy0";
|
2009-08-05 22:29:36 +02:00
|
|
|
};
|
|
|
|
|
2011-07-07 19:23:05 +02:00
|
|
|
buildInputs =
|
|
|
|
[ pkgconfig dbus.libs glib libusb alsaLib python makeWrapper
|
|
|
|
readline libsndfile
|
|
|
|
# Disables GStreamer; not clear what it gains us other than a
|
|
|
|
# zillion extra dependencies.
|
|
|
|
# gst_all.gstreamer gst_all.gstPluginsBase
|
|
|
|
];
|
2009-08-05 22:29:36 +02:00
|
|
|
|
2011-07-07 19:23:05 +02:00
|
|
|
configureFlags = "--localstatedir=/var --enable-cups";
|
2009-08-10 20:24:20 +02:00
|
|
|
|
|
|
|
# Work around `make install' trying to create /var/lib/bluetooth.
|
|
|
|
installFlags = "statedir=$(TMPDIR)/var/lib/bluetooth";
|
|
|
|
|
2011-07-07 19:23:05 +02:00
|
|
|
makeFlags = "rulesdir=$(out)/lib/udev/rules.d";
|
|
|
|
|
|
|
|
/* !!! Move these into a separate package to prevent Bluez from
|
|
|
|
depending on Python etc. */
|
2011-05-21 00:21:34 +02:00
|
|
|
postInstall = ''
|
|
|
|
pushd test
|
2011-12-03 23:23:57 +01:00
|
|
|
for a in simple-agent test-adapter test-device test-input; do
|
2011-05-21 00:21:34 +02:00
|
|
|
cp $a $out/bin/bluez-$a
|
|
|
|
wrapProgram $out/bin/bluez-$a --prefix PYTHONPATH : ${pythonpath}
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
2009-08-05 22:29:36 +02:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.bluez.org/;
|
|
|
|
description = "Bluetooth support for Linux";
|
|
|
|
};
|
|
|
|
}
|