about summary refs log tree commit diff
path: root/pkgs/tools/bluetooth
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-03-08 09:57:58 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-03-08 09:58:19 +0100
commit09af15654f0c8091f1b9e0bbb2e523cdee194442 (patch)
treee648edef1ce4c64c533f2593aa22b8015cf0e506 /pkgs/tools/bluetooth
parentf306e67e15bdbe9a8358c9f81319fc4fcbadc2eb (diff)
parent0ee75214f336474e127c2e3546c0406a0c4d5fa7 (diff)
Merge master into closure-size
The kde-5 stuff still didn't merge well.
I hand-fixed what I saw, but there may be more problems.
Diffstat (limited to 'pkgs/tools/bluetooth')
-rw-r--r--pkgs/tools/bluetooth/blueman/default.nix68
-rw-r--r--pkgs/tools/bluetooth/bluez-tools/default.nix24
-rw-r--r--pkgs/tools/bluetooth/obexfs/default.nix11
-rw-r--r--pkgs/tools/bluetooth/obexftp/default.nix18
-rw-r--r--pkgs/tools/bluetooth/openobex/default.nix12
5 files changed, 87 insertions, 46 deletions
diff --git a/pkgs/tools/bluetooth/blueman/default.nix b/pkgs/tools/bluetooth/blueman/default.nix
index 7acb8ce2eb0bf..428c751571cf9 100644
--- a/pkgs/tools/bluetooth/blueman/default.nix
+++ b/pkgs/tools/bluetooth/blueman/default.nix
@@ -1,43 +1,49 @@
-{ stdenv, fetchurl, pkgconfig, intltool, python, pyrex, pygobject, pygtk
-, notify, pythonDBus, bluez, glib, gtk, libstartup_notification
-, makeWrapper, xdg_utils, obex_data_server
-, libpulseaudio
-}:
-   
-stdenv.mkDerivation rec {
-  name = "blueman-1.23";
+{ stdenv, lib, fetchurl, intltool, pkgconfig, pythonPackages, bluez, polkit, gtk3
+, obex_data_server, xdg_utils, libnotify, dconf, gsettings_desktop_schemas, dnsmasq, dhcp
+, withPulseAudio ? true, libpulseaudio }:
+
+let
+  binPath = lib.makeBinPath [ xdg_utils dnsmasq dhcp ];
+
+in stdenv.mkDerivation rec {
+  name = "blueman-${version}";
+  version = "2.0.3";
    
   src = fetchurl {
-    url = "http://download.tuxfamily.org/blueman/${name}.tar.gz";
-    sha256 = "04ghlh4h5bwp9mqr5jxcmjm01595l5fq5561qxvf369fvjy63cjh";
+    url = "https://github.com/blueman-project/blueman/releases/download/${version}/${name}.tar.xz";
+    sha256 = "09aqlk4c2qzqpmyf7b40sic7d45c1l8fyrb9f3s22b8w83j0adi4";
   };
 
-  configureFlags = "--disable-polkit";
+  nativeBuildInputs = [ intltool pkgconfig pythonPackages.wrapPython pythonPackages.cython ];
+
+  buildInputs = [ bluez gtk3 pythonPackages.python libnotify dconf gsettings_desktop_schemas ]
+                ++ pythonPath
+                ++ lib.optional withPulseAudio libpulseaudio;
+
+  postPatch = lib.optionalString withPulseAudio ''
+    sed -i 's,CDLL(",CDLL("${libpulseaudio}/lib/,g' blueman/main/PulseAudioUtils.py
+  '';
 
-  buildInputs =
-    [ pkgconfig intltool python pyrex pygobject pygtk notify pythonDBus
-      bluez glib gtk libstartup_notification makeWrapper
-    ];
+  pythonPath = with pythonPackages; [ dbus pygobject3 ];
 
-  # !!! Ugly.
-  PYTHONPATH = "${pygobject}/lib/${python.libPrefix}/site-packages/gtk-2.0:${pygtk}/lib/${python.libPrefix}/site-packages/gtk-2.0:${notify}/lib/${python.libPrefix}/site-packages/gtk-2.0";
+  propagatedUserEnvPkgs = [ obex_data_server dconf ];
 
-  postInstall =
-    ''
-      # Create wrappers that set the environment correctly.
-      for i in $out/bin/* $out/libexec/*; do
-          wrapProgram $i \
-              --set PYTHONPATH "$(toPythonPath $out):$PYTHONPATH" \
-              --set LD_LIBRARY_PATH "${libpulseaudio.out}/lib:" \
-              --prefix PATH : ${xdg_utils}/bin
-      done
+  configureFlags = [ (lib.enableFeature withPulseAudio "pulseaudio") ];
 
-      mkdir -p $out/nix-support
-      echo ${obex_data_server} > $out/nix-support/propagated-user-env-packages
-    ''; # */
+  postFixup = ''
+    makeWrapperArgs="\
+      --prefix PATH ':' ${binPath} \
+      --prefix GI_TYPELIB_PATH : $GI_TYPELIB_PATH \
+      --prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \
+      --prefix GIO_EXTRA_MODULES : ${dconf}/lib/gio/modules"
+    wrapPythonPrograms
+  '';
 
-  meta = {
-    homepage = http://blueman-project.org/;
+  meta = with lib; {
+    homepage = https://github.com/blueman-project;
     description = "GTK+-based Bluetooth Manager";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ abbradar ];
   };
 }
diff --git a/pkgs/tools/bluetooth/bluez-tools/default.nix b/pkgs/tools/bluetooth/bluez-tools/default.nix
new file mode 100644
index 0000000000000..4469ba67b3b8c
--- /dev/null
+++ b/pkgs/tools/bluetooth/bluez-tools/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, autoconf, automake, glib, pkgconfig, readline, fetchgit }:
+
+stdenv.mkDerivation rec {
+  date    = "2015-09-10";
+  name    = "bluez-tools-${date}";
+  rev     = "193ad6bb3db";
+
+  src = fetchgit {
+    inherit rev;
+    url    = "https://github.com/khvzak/bluez-tools.git";
+    sha256 = "3f264d14ba8ef1b0d3c45e621a5c685035a60d789da64f64d25055047f45c55b";
+  };
+  preConfigure = ''
+    ./autogen.sh
+  '';
+  buildInputs = [ stdenv autoconf automake glib pkgconfig readline ];
+
+  meta = with stdenv.lib; {
+    description = "Command line bluetooth manager for Bluez5";
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = [ maintainers.dasuxullebt ];
+  };
+
+}
diff --git a/pkgs/tools/bluetooth/obexfs/default.nix b/pkgs/tools/bluetooth/obexfs/default.nix
index aeeeb4bf8d0af..94c011152da6e 100644
--- a/pkgs/tools/bluetooth/obexfs/default.nix
+++ b/pkgs/tools/bluetooth/obexfs/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, pkgconfig, fuse, obexftp}:
+{ stdenv, fetchurl, pkgconfig, fuse, obexftp }:
    
 stdenv.mkDerivation rec {
   name = "obexfs-0.12";
@@ -8,12 +8,13 @@ stdenv.mkDerivation rec {
     sha256 = "1g3krpygk6swa47vbmp9j9s8ahqqcl9ra8r25ybgzv2d9pmjm9kj";
   };
 
-  buildInputs = [pkgconfig fuse obexftp];
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ fuse obexftp ];
 
-  NIX_LDFLAGS = "-lobexftp";
-
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://dev.zuckschwerdt.org/openobex/wiki/ObexFs;
     description = "A tool to mount OBEX-based devices (such as Bluetooth phones)";
+    platforms = platforms.linux;
+    license = licenses.lgpl2Plus;
   };
 }
diff --git a/pkgs/tools/bluetooth/obexftp/default.nix b/pkgs/tools/bluetooth/obexftp/default.nix
index 4a40b4393c37e..12b021d5d3b34 100644
--- a/pkgs/tools/bluetooth/obexftp/default.nix
+++ b/pkgs/tools/bluetooth/obexftp/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, pkgconfig, openobex, bluez, cmake}:
+{ stdenv, fetchurl, pkgconfig, openobex, bluez, cmake }:
    
 stdenv.mkDerivation rec {
   name = "obexftp-0.24";
@@ -8,13 +8,21 @@ stdenv.mkDerivation rec {
     sha256 = "0szy7p3y75bd5h4af0j5kf0fpzx2w560fpy4kg3603mz11b9c1xr";
   };
 
-  buildInputs = [pkgconfig bluez cmake];
+  nativeBuildInputs = [ pkgconfig cmake ];
 
-  propagatedBuildInputs = [openobex];
+  buildInputs = [ bluez ];
 
-  meta = {
+  propagatedBuildInputs = [ openobex ];
+
+  # There's no such thing like "bluetooth" library; possibly they meant "bluez" but it links correctly without this.
+  postFixup = ''
+    sed -i 's,^Requires: bluetooth,Requires:,' $out/lib/pkgconfig/obexftp.pc
+  '';
+
+  meta = with stdenv.lib; {
     homepage = http://dev.zuckschwerdt.org/openobex/wiki/ObexFtp;
     description = "A library and tool to access files on OBEX-based devices (such as Bluetooth phones)";
-    platforms = stdenv.lib.platforms.linux;
+    platforms = platforms.linux;
+    license = licenses.lgpl2Plus;
   };
 }
diff --git a/pkgs/tools/bluetooth/openobex/default.nix b/pkgs/tools/bluetooth/openobex/default.nix
index 7baf1ac3ed987..ec5ca0706f49d 100644
--- a/pkgs/tools/bluetooth/openobex/default.nix
+++ b/pkgs/tools/bluetooth/openobex/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, pkgconfig, bluez, libusb, cmake}:
+{ stdenv, fetchurl, pkgconfig, bluez, libusb, cmake }:
    
 stdenv.mkDerivation rec {
   name = "openobex-1.7.1";
@@ -8,18 +8,20 @@ stdenv.mkDerivation rec {
     sha256 = "0mza0mrdrbcw4yix6qvl31kqy7bdkgxjycr0yx7yl089v5jlc9iv";
   };
 
-  buildInputs = [pkgconfig bluez libusb cmake];
+  nativeBuildInputs = [ pkgconfig cmake ];
+  buildInputs = [ bluez libusb ];
 
-  configureFlags = "--enable-apps";
+  configureFlags = [ "--enable-apps" ];
 
   patchPhase = ''
     sed -i "s!/lib/udev!$out/lib/udev!" udev/CMakeLists.txt
     sed -i "/if ( PKGCONFIG_UDEV_FOUND )/,/endif ( PKGCONFIG_UDEV_FOUND )/d" udev/CMakeLists.txt
     '';
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://dev.zuckschwerdt.org/openobex/;
     description = "An open source implementation of the Object Exchange (OBEX) protocol";
-    platforms = stdenv.lib.platforms.linux;
+    platforms = platforms.linux;
+    license = licenses.lgpl2Plus;
   };
 }