Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
55 lines
1.4 KiB
Nix
55 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
pkg-config,
|
|
bluez,
|
|
libusb-compat-0_1,
|
|
cmake,
|
|
udevCheckHook,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "openobex";
|
|
version = "1.7.2";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/openobex/openobex-${version}-Source.tar.gz";
|
|
sha256 = "1z6l7pbwgs5pjx3861cyd3r6vq5av984bdp4r3hgrw2jxam6120m";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
cmake
|
|
udevCheckHook
|
|
];
|
|
buildInputs = [
|
|
bluez
|
|
libusb-compat-0_1
|
|
];
|
|
|
|
doInstallCheck = true;
|
|
|
|
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
|
|
|
|
# cmake 4 compatibility, upstream is dead
|
|
substituteInPlace CMakeLists.txt \
|
|
--replace-fail "cmake_minimum_required ( VERSION 3.1 FATAL_ERROR )" "cmake_minimum_required ( VERSION 3.10 FATAL_ERROR )"
|
|
|
|
# https://sourceforge.net/p/openobex/bugs/66/
|
|
substituteInPlace CMakeLists.txt \
|
|
--replace-fail '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
|
|
--replace-fail '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "http://dev.zuckschwerdt.org/openobex/";
|
|
description = "Open source implementation of the Object Exchange (OBEX) protocol";
|
|
platforms = platforms.linux;
|
|
license = licenses.lgpl2Plus;
|
|
mainProgram = "obex-check-device";
|
|
};
|
|
}
|