summary refs log blame commit diff
path: root/pkgs/os-specific/linux/bluez/default.nix
blob: ce73745ade32d4895b92a1bae4850ab5d3d4cf76 (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                                               
 
                      




                                                                     

                         
                      


                                                           
                                                                    

    
                                                                               
 




                                                                   








                                                                       




                                                
{ stdenv, fetchurl, pkgconfig, dbus, glib, libusb, alsaLib, python, makeWrapper
, pythonDBus, pygobject }:

assert stdenv.isLinux;

let
  pythonpath = "${pythonDBus}/lib/${python.libPrefix}/site-packages:"
    + "${pygobject}/lib/${python.libPrefix}/site-packages";
in
   
stdenv.mkDerivation rec {
  name = "bluez-4.69";
   
  src = fetchurl {
    url = "mirror://kernel/linux/bluetooth/${name}.tar.gz";
    sha256 = "1h4fp6l1sflc0l5vg90hzvgldlwv7rqc4cbn2z6axmxv969pmrhh";
  };

  buildInputs = [ pkgconfig dbus.libs glib libusb alsaLib python makeWrapper ];

  configureFlags = "--localstatedir=/var";

  # Work around `make install' trying to create /var/lib/bluetooth.
  installFlags = "statedir=$(TMPDIR)/var/lib/bluetooth";

  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
  '';

  meta = {
    homepage = http://www.bluez.org/;
    description = "Bluetooth support for Linux";
  };
}