2011-05-20 23:21:34 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, dbus, glib, libusb, alsaLib, python, makeWrapper
|
2011-06-07 22:48:59 +01:00
|
|
|
, pythonDBus, pygobject, gst_all, readline, libsndfile }:
|
2010-06-10 13:47:58 +01:00
|
|
|
|
2009-08-05 21:29:36 +01:00
|
|
|
assert stdenv.isLinux;
|
2011-05-20 23:21:34 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
pythonpath = "${pythonDBus}/lib/${python.libPrefix}/site-packages:"
|
|
|
|
+ "${pygobject}/lib/${python.libPrefix}/site-packages";
|
|
|
|
in
|
2009-08-05 21:29:36 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2011-06-07 22:48:59 +01:00
|
|
|
name = "bluez-4.90";
|
2009-08-05 21:29:36 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://kernel/linux/bluetooth/${name}.tar.gz";
|
2011-06-07 22:48:59 +01:00
|
|
|
sha256 = "18wq75m45q00fvddzgfqy1d4368649r2jl3j4yvpijymalc4jra7";
|
2009-08-05 21:29:36 +01:00
|
|
|
};
|
|
|
|
|
2011-06-07 22:48:59 +01:00
|
|
|
buildInputs = [ pkgconfig dbus.libs glib libusb alsaLib python makeWrapper
|
|
|
|
gst_all.gstreamer gst_all.gstPluginsBase readline libsndfile ];
|
2009-08-05 21:29:36 +01:00
|
|
|
|
2011-06-07 22:48:59 +01:00
|
|
|
configureFlags = "--localstatedir=/var --enable-udevrules --enable-configrules --enable-cups";
|
2009-08-10 19:24:20 +01:00
|
|
|
|
|
|
|
# Work around `make install' trying to create /var/lib/bluetooth.
|
|
|
|
installFlags = "statedir=$(TMPDIR)/var/lib/bluetooth";
|
|
|
|
|
2011-05-20 23:21:34 +01:00
|
|
|
postInstall = ''
|
|
|
|
pushd test
|
|
|
|
for a in simple-agent test-adapter test-device; do
|
|
|
|
cp $a $out/bin/bluez-$a
|
|
|
|
wrapProgram $out/bin/bluez-$a --prefix PYTHONPATH : ${pythonpath}
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
2009-08-05 21:29:36 +01:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.bluez.org/;
|
|
|
|
description = "Bluetooth support for Linux";
|
|
|
|
};
|
|
|
|
}
|