diff options
Diffstat (limited to 'pkgs/tomahawk')
-rw-r--r-- | pkgs/tomahawk/default.nix | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/tomahawk/default.nix b/pkgs/tomahawk/default.nix new file mode 100644 index 00000000..16219e3b --- /dev/null +++ b/pkgs/tomahawk/default.nix @@ -0,0 +1,59 @@ +{ stdenv, fetchFromGitHub, cmake, pkgconfig, attica, boost, gnutls, libechonest +, liblastfm, lucenepp, vlc, qca2, qca2_ossl, qjson, qt4, qtkeychain, quazip +, sparsehash, taglib, websocketpp, makeWrapper + +, enableXMPP ? true, libjreen ? null +, enableKDE ? false, kdelibs ? null +, enableTelepathy ? false, telepathy_qt ? null +}: + +assert enableXMPP -> libjreen != null; +assert enableKDE -> kdelibs != null; +assert enableTelepathy -> telepathy_qt != null; + +let + quazipQt4 = quazip.override { qt = qt4; }; +in stdenv.mkDerivation rec { + name = "tomahawk-${version}"; + version = "0.9.0-git"; + + src = fetchFromGitHub { + owner = "tomahawk-player"; + repo = "tomahawk"; + rev = "0ec1fa0ab6fd674ca4d898c30739eb058b85dbe5"; + sha256 = "1lfxgi7qib99zzi4byvrz0ng6l51nvfdjciyhabdlqb286wkka2f"; + }; + + cmakeFlags = [ + "-DLUCENEPP_INCLUDE_DIR=${lucenepp}/include" + "-DLUCENEPP_LIBRARY_DIR=${lucenepp}/lib" + ]; + + buildInputs = [ + cmake pkgconfig attica boost gnutls libechonest liblastfm lucenepp vlc + qca2 qjson qt4 qtkeychain quazipQt4 sparsehash taglib websocketpp + makeWrapper + ] ++ stdenv.lib.optional enableXMPP libjreen + ++ stdenv.lib.optional enableKDE kdelibs + ++ stdenv.lib.optional enableTelepathy telepathy_qt; + + postInstall = let + pluginPath = stdenv.lib.concatStringsSep ":" [ + "${qca2_ossl}/lib/qt4/plugins" + ]; + in '' + for i in "$out"/bin/*; do + wrapProgram "$i" --prefix QT_PLUGIN_PATH : "${pluginPath}" + done + ''; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "A multi-source music player"; + homepage = "http://tomahawk-player.org/"; + license = licenses.gpl3Plus; + platforms = platforms.all; + maintainers = [ maintainers.aszlig ]; + }; +} |