2011-05-20 22:21:34 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, dbus, glib, libusb, alsaLib, python, makeWrapper
|
2012-03-14 22:44:52 +00:00
|
|
|
, pythonDBus, pygobject, readline, libsndfile }:
|
2010-06-10 12:47:58 +00:00
|
|
|
|
2009-08-05 20:29:36 +00:00
|
|
|
assert stdenv.isLinux;
|
2011-05-20 22:21:34 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pythonpath = "${pythonDBus}/lib/${python.libPrefix}/site-packages:"
|
|
|
|
+ "${pygobject}/lib/${python.libPrefix}/site-packages";
|
|
|
|
in
|
2009-08-05 20:29:36 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2012-10-29 19:56:26 +00:00
|
|
|
name = "bluez-4.101";
|
2009-08-05 20:29:36 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://kernel/linux/bluetooth/${name}.tar.gz";
|
2012-10-29 19:56:26 +00:00
|
|
|
sha256 = "11vldy255zkmmpj0g0a1m6dy9bzsmyd7vxy02cdfdw79ml888wsr";
|
2009-08-05 20:29:36 +00:00
|
|
|
};
|
|
|
|
|
2011-07-07 17:23:05 +00: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 22:44:52 +00:00
|
|
|
# gstreamer gst_plugins_base
|
2011-07-07 17:23:05 +00:00
|
|
|
];
|
2009-08-05 20:29:36 +00:00
|
|
|
|
2014-11-15 21:22:28 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--enable-cups"
|
|
|
|
"--with-systemdunitdir=$(out)/etc/systemd/system"
|
|
|
|
];
|
2009-08-10 18:24:20 +00:00
|
|
|
|
|
|
|
# Work around `make install' trying to create /var/lib/bluetooth.
|
|
|
|
installFlags = "statedir=$(TMPDIR)/var/lib/bluetooth";
|
|
|
|
|
2011-07-07 17:23:05 +00:00
|
|
|
makeFlags = "rulesdir=$(out)/lib/udev/rules.d";
|
|
|
|
|
|
|
|
/* !!! Move these into a separate package to prevent Bluez from
|
|
|
|
depending on Python etc. */
|
2011-05-20 22:21:34 +00:00
|
|
|
postInstall = ''
|
|
|
|
pushd test
|
2011-12-03 22:23:57 +00:00
|
|
|
for a in simple-agent test-adapter test-device test-input; do
|
2011-05-20 22:21:34 +00:00
|
|
|
cp $a $out/bin/bluez-$a
|
|
|
|
wrapProgram $out/bin/bluez-$a --prefix PYTHONPATH : ${pythonpath}
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
2009-08-05 20:29:36 +00:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.bluez.org/;
|
|
|
|
description = "Bluetooth support for Linux";
|
|
|
|
};
|
|
|
|
}
|