Author: viric
Date: Fri May 20 22:21:34 2011
New Revision: 27284
URL: https://svn.nixos.org/websvn/nix/?rev=27284&sc=1

Log:
Making bluez install some of its test tools. Mainly, the bluez-simple-agent,
that can do a pincode handshake with the user.

Modified:
   nixpkgs/trunk/pkgs/os-specific/linux/bluez/default.nix

Modified: nixpkgs/trunk/pkgs/os-specific/linux/bluez/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/os-specific/linux/bluez/default.nix      Fri May 20 
17:00:49 2011        (r27283)
+++ nixpkgs/trunk/pkgs/os-specific/linux/bluez/default.nix      Fri May 20 
22:21:34 2011        (r27284)
@@ -1,6 +1,12 @@
-{ stdenv, fetchurl, pkgconfig, dbus, glib, libusb, alsaLib }:
+{ 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";
@@ -10,13 +16,22 @@
     sha256 = "1h4fp6l1sflc0l5vg90hzvgldlwv7rqc4cbn2z6axmxv969pmrhh";
   };
 
-  buildInputs = [ pkgconfig dbus.libs glib libusb alsaLib ];
+  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";
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to