16 stdenv.mkDerivation rec {
20 src = fetchFromGitHub {
23 rev = "libmtp-${builtins.replaceStrings [ "." ] [ "-" ] version}";
24 sha256 = "sha256-m9QFVD8udQ3SdGwn276BnIKqGeATA5QuokOK29Ykc1k=";
30 url = "https://github.com/libmtp/libmtp/commit/467fa26e6b14c0884b15cf6d191de97e5513fe05.patch";
31 sha256 = "2DrRrdcguJ9su4LxtT6YOjer8gUTxIoHVpk+6M9P4cg=";
49 buildInputs = [ libiconv ];
51 propagatedBuildInputs = [ libusb1 ];
53 preConfigure = "NOCONFIGURE=1 ./autogen.sh";
55 configureFlags = [ "--with-udev=${placeholder "out"}/lib/udev" ];
57 configurePlatforms = [
63 lib.optionals (stdenv.hostPlatform.isLinux && !stdenv.buildPlatform.canExecute stdenv.hostPlatform)
65 "MTP_HOTPLUG=${buildPackages.libmtp}/bin/mtp-hotplug"
68 enableParallelBuilding = true;
71 homepage = "https://github.com/libmtp/libmtp";
72 description = "Implementation of Microsoft's Media Transfer Protocol";
74 libmtp is an implementation of Microsoft's Media Transfer Protocol (MTP)
75 in the form of a library suitable primarily for POSIX compliant operating
76 systems. We implement MTP Basic, the stuff proposed for standardization.
78 platforms = platforms.unix;
79 license = licenses.lgpl21;
80 maintainers = with maintainers; [ lovesegfault ];