1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/os-specific/linux/bluez/default.nix

54 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, dbus, glib, libusb, alsaLib, pythonPackages, makeWrapper
, readline, libsndfile }:
assert stdenv.isLinux;
let
inherit (pythonPackages) python;
pythonpath = "${pythonPackages.dbus-python}/lib/${python.libPrefix}/site-packages:"
+ "${pythonPackages.pygobject2}/lib/${python.libPrefix}/site-packages";
in stdenv.mkDerivation rec {
2012-10-29 19:56:26 +00:00
name = "bluez-4.101";
src = fetchurl {
url = "mirror://kernel/linux/bluetooth/${name}.tar.gz";
2012-10-29 19:56:26 +00:00
sha256 = "11vldy255zkmmpj0g0a1m6dy9bzsmyd7vxy02cdfdw79ml888wsr";
};
buildInputs =
[ pkgconfig dbus glib libusb alsaLib python makeWrapper
readline libsndfile
# Disables GStreamer; not clear what it gains us other than a
# zillion extra dependencies.
# gstreamer gst-plugins-base
];
2014-11-15 21:22:28 +00:00
configureFlags = [
"--localstatedir=/var"
"--enable-cups"
"--with-systemdunitdir=$(out)/etc/systemd/system"
];
# Work around `make install' trying to create /var/lib/bluetooth.
installFlags = "statedir=$(TMPDIR)/var/lib/bluetooth";
makeFlags = "rulesdir=$(out)/lib/udev/rules.d";
/* !!! Move these into a separate package to prevent Bluez from
depending on Python etc. */
postInstall = ''
pushd test
for a in simple-agent test-adapter test-device test-input; do
cp $a $out/bin/bluez-$a
wrapProgram $out/bin/bluez-$a --prefix PYTHONPATH : ${pythonpath}
done
popd
'';
meta = {
homepage = http://www.bluez.org/;
description = "Bluetooth support for Linux";
platforms = stdenv.lib.platforms.linux;
};
}