2016-08-16 22:51:21 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, dbus, glib, libusb, alsaLib, pythonPackages, makeWrapper
|
|
|
|
, 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
|
2016-08-16 22:51:21 +02:00
|
|
|
inherit (pythonPackages) python;
|
2017-02-01 22:51:39 +01:00
|
|
|
pythonpath = "${pythonPackages.dbus-python}/lib/${python.libPrefix}/site-packages:"
|
|
|
|
+ "${pythonPackages.pygobject2}/lib/${python.libPrefix}/site-packages";
|
2016-08-16 22:51:21 +02:00
|
|
|
in stdenv.mkDerivation rec {
|
2012-10-29 20:56:26 +01:00
|
|
|
name = "bluez-4.101";
|
2009-08-05 22:29:36 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://kernel/linux/bluetooth/${name}.tar.gz";
|
2012-10-29 20:56:26 +01:00
|
|
|
sha256 = "11vldy255zkmmpj0g0a1m6dy9bzsmyd7vxy02cdfdw79ml888wsr";
|
2009-08-05 22:29:36 +02:00
|
|
|
};
|
|
|
|
|
2011-07-07 19:23:05 +02:00
|
|
|
buildInputs =
|
2015-10-13 14:33:08 +02:00
|
|
|
[ pkgconfig dbus glib libusb alsaLib python makeWrapper
|
2011-07-07 19:23:05 +02:00
|
|
|
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
|
|
|
|
2014-11-15 22:22:28 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--enable-cups"
|
|
|
|
"--with-systemdunitdir=$(out)/etc/systemd/system"
|
|
|
|
];
|
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";
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2009-08-05 22:29:36 +02:00
|
|
|
};
|
|
|
|
}
|