about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/audio/tomahawk/default.nix
blob: 78bd43383539921c05988ae9d3df3c07a5cf6623 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ stdenv, fetchurl, cmake, pkgconfig, attica, boost, gnutls, libechonest
, liblastfm, lucenepp, phonon, phonon-backend-vlc, qca2, qjson, qt4
, qtkeychain, quazip, sparsehash, taglib, websocketpp, makeWrapper

, enableXMPP      ? true,  libjreen     ? null
, enableKDE       ? false, kdelibs4     ? null
, enableTelepathy ? false, telepathy-qt ? null
}:

assert enableXMPP      -> libjreen     != null;
assert enableKDE       -> kdelibs4     != null;
assert enableTelepathy -> telepathy-qt != null;

stdenv.mkDerivation rec {
  name = "tomahawk-${version}";
  version = "0.8.4";

  src = fetchurl {
    url = "http://download.tomahawk-player.org/${name}.tar.bz2";
    sha256 = "0j84h36wkjfjbsd7ybyji7rcc9wpjdbl0f1xdcc1g7h0nz34pc0g";
  };

  cmakeFlags = [
    "-DLUCENEPP_INCLUDE_DIR=${lucenepp}/include"
    "-DLUCENEPP_LIBRARY_DIR=${lucenepp}/lib"
  ];

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [
    cmake attica boost gnutls libechonest liblastfm lucenepp phonon
    qca2 qjson qt4 qtkeychain quazip sparsehash taglib websocketpp
    makeWrapper
  ] ++ stdenv.lib.optional enableXMPP      libjreen
    ++ stdenv.lib.optional enableKDE       kdelibs4
    ++ stdenv.lib.optional enableTelepathy telepathy-qt;

  postInstall = let
    pluginPath = stdenv.lib.concatStringsSep ":" [
      "${phonon-backend-vlc}/lib/kde4/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 (unmaintained)";
    homepage = http://tomahawk-player.org/;
    license = licenses.gpl3Plus;
    platforms = platforms.all;
    broken = true; # 2018-06-25
  };
}