about summary refs log tree commit diff
path: root/pkgs/tools/bluetooth/openobex/default.nix
blob: ec5ca0706f49dbb635ca577a3107f1a6d1c97851 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ stdenv, fetchurl, pkgconfig, bluez, libusb, cmake }:
   
stdenv.mkDerivation rec {
  name = "openobex-1.7.1";
   
  src = fetchurl {
    url = "mirror://sourceforge/openobex/${name}-Source.tar.gz";
    sha256 = "0mza0mrdrbcw4yix6qvl31kqy7bdkgxjycr0yx7yl089v5jlc9iv";
  };

  nativeBuildInputs = [ pkgconfig cmake ];
  buildInputs = [ bluez libusb ];

  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 = with stdenv.lib; {
    homepage = http://dev.zuckschwerdt.org/openobex/;
    description = "An open source implementation of the Object Exchange (OBEX) protocol";
    platforms = platforms.linux;
    license = licenses.lgpl2Plus;
  };
}