···11+{ stdenv, lib, fetchurl, withMtp ? true, libmtp, pkgconfig, which, qt4 }:
22+33+stdenv.mkDerivation rec {
44+ name = "qtscrobbler-${version}";
55+ version = "0.11";
66+77+ src = fetchurl {
88+ url = "mirror://sourceforge/qtscrob/qtscrob/${version}/qtscrob-${version}.tar.bz2";
99+ sha256 = "01c8e48f616ed09504833d27d92fd62f455bd645ea2d1cc2a5f4c287d641daba";
1010+ };
1111+1212+ nativeBuildInputs = lib.optionals withMtp [ pkgconfig which ];
1313+ buildInputs = [ qt4 ] ++ lib.optional withMtp libmtp;
1414+1515+ enableParallelBuilding = true;
1616+1717+ postPatch = ''
1818+ cd src
1919+ sed -i "s,/usr/local,$out," common.pri
2020+ '';
2121+2222+ configurePhase = "qmake";
2323+2424+ meta = with lib; {
2525+ description = "Qt based last.fm scrobbler";
2626+ longDescription = ''
2727+ QTScrobbler is a tool to upload information about the tracks you have played from your Digital Audio Player (DAP) to your last.fm account.
2828+ It is able to gather this information from Apple iPods or DAPs running the Rockbox replacement firmware.
2929+ '';
3030+3131+ homepage = http://qtscrob.sourceforge.net;
3232+ license = licenses.gpl2;
3333+ maintainers = [ maintainers.vanzef ];
3434+ platforms = platforms.linux;
3535+ };
3636+}