15 stdenv.mkDerivation rec {
19 src = fetchFromGitHub {
22 rev = "libmtp-${builtins.replaceStrings [ "." ] [ "-" ] version}";
23 sha256 = "sha256-m9QFVD8udQ3SdGwn276BnIKqGeATA5QuokOK29Ykc1k=";
29 url = "https://github.com/libmtp/libmtp/commit/467fa26e6b14c0884b15cf6d191de97e5513fe05.patch";
30 sha256 = "2DrRrdcguJ9su4LxtT6YOjer8gUTxIoHVpk+6M9P4cg=";
34 outputs = [ "bin" "dev" "out" ];
44 buildInputs = [ libiconv ];
46 propagatedBuildInputs = [ libusb1 ];
48 preConfigure = "NOCONFIGURE=1 ./autogen.sh";
50 configureFlags = [ "--with-udev=${placeholder "out"}/lib/udev" ];
52 configurePlatforms = [ "build" "host" ];
54 makeFlags = lib.optionals (stdenv.isLinux && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
55 "MTP_HOTPLUG=${buildPackages.libmtp}/bin/mtp-hotplug"
58 enableParallelBuilding = true;
61 homepage = "https://github.com/libmtp/libmtp";
62 description = "An implementation of Microsoft's Media Transfer Protocol";
64 libmtp is an implementation of Microsoft's Media Transfer Protocol (MTP)
65 in the form of a library suitable primarily for POSIX compliant operating
66 systems. We implement MTP Basic, the stuff proposed for standardization.
68 platforms = platforms.unix;
69 license = licenses.lgpl21;
70 maintainers = with maintainers; [ lovesegfault ];