2021-12-06 16:07:01 +00:00
|
|
|
{ stdenv
|
|
|
|
, autoconf
|
|
|
|
, automake
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gettext
|
|
|
|
, lib
|
2020-12-07 07:45:13 +00:00
|
|
|
, libiconv
|
2021-12-06 16:07:01 +00:00
|
|
|
, libtool
|
|
|
|
, libusb1
|
|
|
|
, pkg-config
|
2020-12-07 07:45:13 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-12-07 07:45:13 +00:00
|
|
|
pname = "libmtp";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "1.1.20";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-07 07:45:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libmtp";
|
|
|
|
repo = "libmtp";
|
|
|
|
rev = "libmtp-${builtins.replaceStrings [ "." ] [ "-" ] version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-/tyCoEW/rCLfZH2HhA3Nxuij9d/ZJgsfyP4fLlfyNRA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "bin" "dev" "out" ];
|
|
|
|
|
2020-12-07 07:45:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoconf
|
|
|
|
automake
|
|
|
|
gettext
|
|
|
|
libtool
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-12-07 07:45:13 +00:00
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildInputs = [ libiconv ];
|
2020-12-07 07:45:13 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [ libusb1 ];
|
|
|
|
|
|
|
|
preConfigure = "./autogen.sh";
|
2020-12-07 07:45:13 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
configureFlags = [ "--with-udev=${placeholder "out"}/lib/udev" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
enableParallelBuilding = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/libmtp/libmtp";
|
2020-04-24 23:36:52 +00:00
|
|
|
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.
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.lgpl21;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|