mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 08:43:06 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
34 lines
1.1 KiB
Nix
34 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl, pkg-config, bluez, libusb-compat-0_1, cmake }:
|
|
|
|
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 ];
|
|
buildInputs = [ bluez libusb-compat-0_1 ];
|
|
|
|
configureFlags = [ "--enable-apps" ];
|
|
|
|
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
|
|
# https://sourceforge.net/p/openobex/bugs/66/
|
|
substituteInPlace CMakeLists.txt \
|
|
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
|
|
--replace '\$'{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";
|
|
};
|
|
}
|