nixpkgs/pkgs/development/libraries/libmtp/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

73 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv
, autoconf
, automake
, fetchFromGitHub
2023-04-24 20:34:25 +00:00
, fetchpatch
, gettext
, lib
, libiconv
, libtool
, libusb1
, pkg-config
2023-04-24 20:34:25 +00:00
, buildPackages
}:
stdenv.mkDerivation rec {
pname = "libmtp";
2023-04-27 05:48:33 +00:00
version = "1.1.21";
src = fetchFromGitHub {
owner = "libmtp";
repo = "libmtp";
rev = "libmtp-${builtins.replaceStrings [ "." ] [ "-" ] version}";
2023-04-27 05:48:33 +00:00
sha256 = "sha256-m9QFVD8udQ3SdGwn276BnIKqGeATA5QuokOK29Ykc1k=";
};
2023-04-24 20:34:25 +00:00
patches = [
# Backport cross fix.
(fetchpatch {
url = "https://github.com/libmtp/libmtp/commit/467fa26e6b14c0884b15cf6d191de97e5513fe05.patch";
sha256 = "2DrRrdcguJ9su4LxtT6YOjer8gUTxIoHVpk+6M9P4cg=";
})
];
outputs = [ "bin" "dev" "out" ];
2015-10-17 21:24:10 +00:00
nativeBuildInputs = [
autoconf
automake
gettext
libtool
pkg-config
];
buildInputs = [ libiconv ];
propagatedBuildInputs = [ libusb1 ];
preConfigure = "NOCONFIGURE=1 ./autogen.sh";
configureFlags = [ "--with-udev=${placeholder "out"}/lib/udev" ];
2015-10-17 21:24:10 +00:00
configurePlatforms = [ "build" "host" ];
2023-04-24 20:34:25 +00:00
makeFlags = lib.optionals (stdenv.isLinux && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
"MTP_HOTPLUG=${buildPackages.libmtp}/bin/mtp-hotplug"
];
enableParallelBuilding = true;
2015-10-17 21:24:10 +00:00
meta = with lib; {
homepage = "https://github.com/libmtp/libmtp";
description = "An implementation of Microsoft's Media Transfer Protocol";
longDescription = ''
libmtp is an implementation of Microsoft's Media Transfer Protocol (MTP)
in the form of a library suitable primarily for POSIX compliant operating
systems. We implement MTP Basic, the stuff proposed for standardization.
'';
2018-10-18 19:06:37 +00:00
platforms = platforms.unix;
license = licenses.lgpl21;
maintainers = with maintainers; [ lovesegfault ];
};
}