biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / bluetooth / openobex / default.nix
blob521505211219e445eca63e583cc1863224738f6e
1 { lib, stdenv, fetchurl, pkg-config, bluez, libusb-compat-0_1, cmake }:
3 stdenv.mkDerivation rec {
4   pname = "openobex";
5   version = "1.7.2";
7   src = fetchurl {
8     url = "mirror://sourceforge/openobex/openobex-${version}-Source.tar.gz";
9     sha256 = "1z6l7pbwgs5pjx3861cyd3r6vq5av984bdp4r3hgrw2jxam6120m";
10   };
12   nativeBuildInputs = [ pkg-config cmake ];
13   buildInputs = [ bluez libusb-compat-0_1 ];
15   configureFlags = [ "--enable-apps" ];
17   patchPhase = ''
18     sed -i "s!/lib/udev!$out/lib/udev!" udev/CMakeLists.txt
19     sed -i "/if ( PKGCONFIG_UDEV_FOUND )/,/endif ( PKGCONFIG_UDEV_FOUND )/d" udev/CMakeLists.txt
20     # https://sourceforge.net/p/openobex/bugs/66/
21     substituteInPlace CMakeLists.txt \
22       --replace '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
23       --replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
24     '';
26   meta = with lib; {
27     homepage = "http://dev.zuckschwerdt.org/openobex/";
28     description = "Open source implementation of the Object Exchange (OBEX) protocol";
29     platforms = platforms.linux;
30     license = licenses.lgpl2Plus;
31     mainProgram = "obex-check-device";
32   };