2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, openobex, bluez, cmake }:
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-08-18 13:19:15 +00:00
|
|
|
pname = "obexftp";
|
|
|
|
version = "0.24.2";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2021-08-18 13:19:15 +00:00
|
|
|
url = "mirror://sourceforge/openobex/obexftp-${version}-Source.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "18w9r78z78ri5qc8fjym4nk1jfbrkyr789sq7rxrkshf1a7b83yl";
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config cmake ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ bluez ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ openobex ];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
# https://sourceforge.net/p/openobex/bugs/66/
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMakeLists.txt \
|
|
|
|
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
|
|
|
|
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# 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
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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 = platforms.linux;
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
};
|
|
|
|
}
|