@@ -1,5 +1,4 @@
1−{ fetchgit, libcommuni, qt5, stdenv
2−}:
1+{ fetchgit, libcommuni, makeQtWrapper, qt5, stdenv }:
32
43stdenv.mkDerivation rec {
54 name = "communi-${version}";
@@ -11,20 +10,32 @@ stdenv.mkDerivation rec {
1110 sha256 = "0gk6gck09zb44qfsal7bs4ln2vl9s9x3vfxh7jvfc7mmf7l3sspd";
1211 };
1312
13+ nativeBuildInputs = [ makeQtWrapper ];
14+
1415 buildInputs = [ libcommuni qt5.qtbase ];
1516
1617 enableParallelBuild = true;
1718
1819 configurePhase = ''
1920 export QMAKEFEATURES=${libcommuni}/features
20− qmake -r COMMUNI_INSTALL_PREFIX=$out
21+ qmake -r \
22+ COMMUNI_INSTALL_PREFIX=$out \
23+ COMMUNI_INSTALL_BINS=$out/bin \
24+ COMMUNI_INSTALL_PLUGINS=$out/lib/communi/plugins \
25+ COMMUNI_INSTALL_ICONS=$out/share/icons/hicolor \
26+ COMMUNI_INSTALL_DESKTOP=$out/share/applications \
27+ COMMUNI_INSTALL_THEMES=$out/share/communi/themes
28+ '';
29+
30+ postInstall = ''
31+ wrapQtProgram "$out/bin/communi"
2132 '';
2233
2334 meta = with stdenv.lib; {
2435 description = "A simple and elegant cross-platform IRC client";
2536 homepage = https://github.com/communi/communi-desktop;
2637 license = licenses.bsd3;
27− platforms = platforms.all;
2838 maintainers = with maintainers; [ hrdinka ];
39+ platforms = platforms.all;
2940 };
3041}