Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, pkg-config, openobex, bluez, cmake }: 2 3stdenv.mkDerivation rec { 4 pname = "obexftp"; 5 version = "0.24.2"; 6 7 src = fetchurl { 8 url = "mirror://sourceforge/openobex/obexftp-${version}-Source.tar.gz"; 9 sha256 = "18w9r78z78ri5qc8fjym4nk1jfbrkyr789sq7rxrkshf1a7b83yl"; 10 }; 11 12 nativeBuildInputs = [ pkg-config cmake ]; 13 14 buildInputs = [ bluez ]; 15 16 propagatedBuildInputs = [ openobex ]; 17 18 # https://sourceforge.net/p/openobex/bugs/66/ 19 postPatch = '' 20 substituteInPlace CMakeLists.txt \ 21 --replace '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \ 22 --replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR} 23 ''; 24 25 # There's no such thing like "bluetooth" library; possibly they meant "bluez" but it links correctly without this. 26 postFixup = '' 27 sed -i 's,^Requires: bluetooth,Requires:,' $out/lib/pkgconfig/obexftp.pc 28 ''; 29 30 meta = with lib; { 31 homepage = "http://dev.zuckschwerdt.org/openobex/wiki/ObexFtp"; 32 description = "A library and tool to access files on OBEX-based devices (such as Bluetooth phones)"; 33 platforms = platforms.linux; 34 license = licenses.lgpl2Plus; 35 }; 36}