···1+{ stdenv, lib, fetchurl, withMtp ? true, libmtp, pkgconfig, which, qt4 }:
2+3+stdenv.mkDerivation rec {
4+ name = "qtscrobbler-${version}";
5+ version = "0.11";
6+7+ src = fetchurl {
8+ url = "mirror://sourceforge/qtscrob/qtscrob/${version}/qtscrob-${version}.tar.bz2";
9+ sha256 = "01c8e48f616ed09504833d27d92fd62f455bd645ea2d1cc2a5f4c287d641daba";
10+ };
11+12+ nativeBuildInputs = lib.optionals withMtp [ pkgconfig which ];
13+ buildInputs = [ qt4 ] ++ lib.optional withMtp libmtp;
14+15+ enableParallelBuilding = true;
16+17+ postPatch = ''
18+ cd src
19+ sed -i "s,/usr/local,$out," common.pri
20+ '';
21+22+ configurePhase = "qmake";
23+24+ meta = with lib; {
25+ description = "Qt based last.fm scrobbler";
26+ longDescription = ''
27+ QTScrobbler is a tool to upload information about the tracks you have played from your Digital Audio Player (DAP) to your last.fm account.
28+ It is able to gather this information from Apple iPods or DAPs running the Rockbox replacement firmware.
29+ '';
30+31+ homepage = http://qtscrob.sourceforge.net;
32+ license = licenses.gpl2;
33+ maintainers = [ maintainers.vanzef ];
34+ platforms = platforms.linux;
35+ };
36+}