1{ stdenv, fetchgit, qt5, makeWrapper, libX11 }:
2
3stdenv.mkDerivation rec {
4 name = "cmst-2014.12.05";
5 rev = "refs/tags/${name}";
6 src = fetchgit {
7 url = "git://github.com/andrew-bibb/cmst.git";
8 inherit rev;
9 sha256 = "070rxv3kyn41ra7nnk1wbqvy6fjg38h7hrdv4dn71b201kmzd194";
10 };
11
12 buildInputs = [ qt5.base makeWrapper ];
13
14 configurePhase = ''
15 substituteInPlace ./cmst.pro \
16 --replace "/usr/bin" "$out/bin" \
17 --replace "/usr/share" "$out/usr/share"
18
19 substituteInPlace ./cmst.pri \
20 --replace "/usr/lib" "$out/lib" \
21 --replace "/usr/share" "$out/share"
22
23 substituteInPlace ./apps/cmstapp/cmstapp.pro \
24 --replace "/usr/bin" "$out/bin" \
25 --replace "/usr/share" "$out/share"
26
27 substituteInPlace ./apps/rootapp/rootapp.pro \
28 --replace "/etc" "$out/etc" \
29 --replace "/usr/share" "$out/share"
30
31 '';
32
33 buildPhase = ''
34 qmake PREFIX=$out
35 make
36 '';
37
38 postInstall = ''
39 wrapProgram $out/bin/cmst \
40 --prefix "QTCOMPOSE" ":" "${libX11}/share/X11/locale"
41 '';
42
43 meta = {
44 description = "QT GUI for Connman with system tray icon";
45 homepage = "https://github.com/andrew-bibb/cmst";
46 maintainers = [ stdenv.lib.maintainers.matejc ];
47 platforms = stdenv.lib.platforms.linux;
48 license = stdenv.lib.licenses.mit;
49 };
50}