2011-05-21 00:21:34 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, dbus, glib, libusb, alsaLib, python, makeWrapper
|
2012-03-14 23:44:52 +01:00
|
|
|
, pythonDBus, pygobject, 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 {
|
2012-01-27 00:23:32 +01:00
|
|
|
name = "bluez-4.98";
|
2009-08-05 22:29:36 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://kernel/linux/bluetooth/${name}.tar.gz";
|
2012-01-27 00:23:32 +01:00
|
|
|
sha256 = "9a5b655bada7c7a1921cb3bac83b8a32bbe49893e4c7a1377cdc1b0d35f7d233";
|
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.
|
2012-03-14 23:44:52 +01:00
|
|
|
# gstreamer gst_plugins_base
|
2011-07-07 19:23:05 +02:00
|
|
|
];
|
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";
|
|
|
|
};
|
|
|
|
}
|