1 { lib, stdenv, fetchurl, pkg-config, openobex, bluez, cmake }:
3 stdenv.mkDerivation rec {
8 url = "mirror://sourceforge/openobex/obexftp-${version}-Source.tar.gz";
9 sha256 = "18w9r78z78ri5qc8fjym4nk1jfbrkyr789sq7rxrkshf1a7b83yl";
12 nativeBuildInputs = [ pkg-config cmake ];
14 buildInputs = [ bluez ];
16 propagatedBuildInputs = [ openobex ];
18 # https://sourceforge.net/p/openobex/bugs/66/
20 substituteInPlace CMakeLists.txt \
21 --replace '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
22 --replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
25 # There's no such thing like "bluetooth" library; possibly they meant "bluez" but it links correctly without this.
27 sed -i 's,^Requires: bluetooth,Requires:,' $out/lib/pkgconfig/obexftp.pc
31 homepage = "http://dev.zuckschwerdt.org/openobex/wiki/ObexFtp";
32 description = "Library and tool to access files on OBEX-based devices (such as Bluetooth phones)";
33 platforms = platforms.linux;
34 license = licenses.lgpl2Plus;