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