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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
{ stdenv, fetchFromGitHub, cmake, pkgconfig, attica, boost, gnutls, libechonest
, liblastfm, lucenepp, vlc_qt5, qca2, qjson, qt54, qtkeychain, quazip
, kf5_latest, sparsehash, taglib, websocketpp, makeWrapper, ffmpeg_2, v4l_utils
, 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;
with stdenv.lib;
let
useQT5 = pkg: pkg.override (attrs: {
${if attrs ? qt4 then "qt4" else "qt"} = qt54.base;
});
libechonestQT5 = overrideDerivation ((useQT5 libechonest).override {
qjson = useQT5 qjson;
}) (drv: {
cmakeFlags = (drv.cmakeFlags or []) ++ [ "-DBUILD_WITH_QT4=OFF" ];
});
atticaQT5 = overrideDerivation (useQT5 attica) (drv: {
buildInputs = (drv.buildInputs or []) ++ [
kf5_latest.extra-cmake-modules
];
});
vlc = vlc_qt5.override {
ffmpeg = ffmpeg_2.override {
v4l_utils = v4l_utils.override { withQt4 = false; };
};
};
in stdenv.mkDerivation rec {
name = "tomahawk-${version}";
version = "0.9.0-git";
src = fetchFromGitHub {
owner = "tomahawk-player";
repo = "tomahawk";
rev = "cb72b9e4d4066a502132f2fffad0368f61fce948";
sha256 = "07gpf885hxv5xmv3acixm0rhinqilygrw7542nj7s68iigd9sfqd";
};
cmakeFlags = [
"-DLUCENEPP_INCLUDE_DIR=${lucenepp}/include"
"-DLUCENEPP_LIBRARY_DIR=${lucenepp}/lib"
];
buildInputs = (map useQT5 [ qca2 liblastfm quazip qtkeychain qjson ]) ++ [
libechonestQT5 atticaQT5 cmake pkgconfig boost gnutls lucenepp vlc
qt54.base sparsehash taglib websocketpp makeWrapper
] ++ stdenv.lib.optional enableXMPP (useQT5 libjreen)
++ stdenv.lib.optional enableKDE (useQT5 kdelibs)
++ stdenv.lib.optional enableTelepathy (useQT5 telepathy_qt);
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 ];
};
}
|