quassel: add optional KF5 features

Also fixes conditional dependencies so that TLS is enabled.

+50 -23
+32 -23
pkgs/applications/networking/irc/quassel/default.nix
··· 1 { monolithic ? true # build monolithic Quassel 2 , daemon ? false # build Quassel daemon 3 , client ? false # build Quassel client 4 - , withKDE ? stdenv.isLinux # enable KDE integration 5 , previews ? false # enable webpage previews on hovering over URLs 6 , tag ? "" # tag added to the package name 7 - , kdelibs ? null # optional 8 - , useQt5 ? false 9 - , phonon_qt5, libdbusmenu_qt5 10 - , stdenv, fetchurl, cmake, makeWrapper, qt, automoc4, phonon, dconf, qca2, qca-qt5 }: 11 12 13 assert stdenv.isLinux; 14 15 assert monolithic -> !client && !daemon; 16 assert client || daemon -> !monolithic; 17 - assert withKDE -> kdelibs != null; 18 19 let 20 edf = flag: feature: [("-D" + feature + (if flag then "=ON" else "=OFF"))]; ··· 31 32 enableParallelBuilding = true; 33 34 - buildInputs = [ cmake makeWrapper ] 35 - ++ (if useQt5 then [ qt.base qca-qt5 ] else [ qt qca2 ]) 36 - ++ (if useQt5 && (monolithic || daemon) then [ qt.script ] else []) 37 - ++ (if useQt5 && previews then [ qt.webkit qt.webkitwidgets ] else []) 38 - ++ lib.optional withKDE kdelibs 39 - ++ lib.optional withKDE automoc4 40 - ++ lib.optional withKDE phonon 41 - ++ lib.optional useQt5 phonon_qt5 42 - ++ lib.optional useQt5 libdbusmenu_qt5; 43 44 cmakeFlags = [ 45 "-DEMBED_DATA=OFF" ··· 52 ++ edf useQt5 "USE_QT5"; 53 54 preFixup = 55 - lib.optionalString client '' 56 - wrapProgram "$out/bin/quasselclient" \ 57 - --prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules" 58 - '' + 59 - lib.optionalString monolithic '' 60 - wrapProgram "$out/bin/quassel" \ 61 --prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules" 62 ''; 63 64 meta = with stdenv.lib; { 65 homepage = http://quassel-irc.org/; 66 - description = "Qt4/KDE4/Qt5 distributed IRC client suppporting a remote daemon"; 67 longDescription = '' 68 Quassel IRC is a cross-platform, distributed IRC client, 69 meaning that one (or multiple) client(s) can attach to 70 and detach from a central core -- much like the popular 71 combination of screen and a text-based IRC client such 72 - as WeeChat, but graphical (based on Qt4/KDE4 or Qt5). 73 ''; 74 license = stdenv.lib.licenses.gpl3; 75 maintainers = with maintainers; [ phreedom ttuegel ];
··· 1 { monolithic ? true # build monolithic Quassel 2 , daemon ? false # build Quassel daemon 3 , client ? false # build Quassel client 4 , previews ? false # enable webpage previews on hovering over URLs 5 , tag ? "" # tag added to the package name 6 + , useQt5 ? false, phonon_qt5, libdbusmenu_qt5, qca-qt5 7 + , withKDE ? stdenv.isLinux # enable KDE integration 8 + , kf5 ? null, kdelibs ? null 9 10 + , stdenv, fetchurl, cmake, makeWrapper, qt, automoc4, phonon, dconf, qca2 }: 11 + 12 + let useKF5 = useQt5 && withKDE; 13 + useKDE4 = withKDE && !useQt5; 14 + buildClient = monolithic || client; 15 + buildCore = monolithic || daemon; 16 + in 17 18 assert stdenv.isLinux; 19 20 assert monolithic -> !client && !daemon; 21 assert client || daemon -> !monolithic; 22 + assert useKDE4 -> kdelibs != null; 23 + assert useKF5 -> kf5 != null; 24 + assert !buildClient -> !withKDE; # KDE is used by the client only 25 26 let 27 edf = flag: feature: [("-D" + feature + (if flag then "=ON" else "=OFF"))]; ··· 38 39 enableParallelBuilding = true; 40 41 + buildInputs = 42 + [ cmake makeWrapper ] 43 + ++ [(if useQt5 then qt.base else qt)] 44 + ++ lib.optionals buildCore (if useQt5 then [qt.script qca-qt5] else [qca2]) 45 + ++ lib.optionals buildClient 46 + ( lib.optionals (previews && useQt5) [qt.webkit qt.webkitwidgets] 47 + ++ lib.optionals useQt5 [libdbusmenu_qt5 phonon_qt5] 48 + ++ lib.optionals useKDE4 [automoc4 kdelibs phonon] 49 + ++ lib.optionals useKF5 50 + (with kf5; [ 51 + extra-cmake-modules kconfigwidgets kcoreaddons 52 + knotifications knotifyconfig ktextwidgets kwidgetsaddons 53 + kxmlgui 54 + ]) 55 + ); 56 57 cmakeFlags = [ 58 "-DEMBED_DATA=OFF" ··· 65 ++ edf useQt5 "USE_QT5"; 66 67 preFixup = 68 + lib.optionalString buildClient '' 69 + wrapProgram "$out/bin/quassel${lib.optionalString client "client"}" \ 70 --prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules" 71 ''; 72 73 meta = with stdenv.lib; { 74 homepage = http://quassel-irc.org/; 75 + description = "Qt/KDE distributed IRC client suppporting a remote daemon"; 76 longDescription = '' 77 Quassel IRC is a cross-platform, distributed IRC client, 78 meaning that one (or multiple) client(s) can attach to 79 and detach from a central core -- much like the popular 80 combination of screen and a text-based IRC client such 81 + as WeeChat, but graphical (based on Qt4/KDE4 or Qt5/KF5). 82 ''; 83 license = stdenv.lib.licenses.gpl3; 84 maintainers = with maintainers; [ phreedom ttuegel ];
+18
pkgs/top-level/all-packages.nix
··· 12453 tag = "-daemon-qt5"; 12454 }; 12455 12456 quirc = callPackage ../tools/graphics/quirc {}; 12457 12458 quodlibet = callPackage ../applications/audio/quodlibet {
··· 12453 tag = "-daemon-qt5"; 12454 }; 12455 12456 + quassel_kf5 = callPackage ../applications/networking/irc/quassel { 12457 + monolithic = true; 12458 + daemon = false; 12459 + client = false; 12460 + withKDE = true; 12461 + useQt5 = true; 12462 + qt = qt5; 12463 + kf5 = kf510; 12464 + dconf = gnome3.dconf; 12465 + tag = "-kf5"; 12466 + }; 12467 + 12468 + quasselClient_kf5 = quassel_kf5.override { 12469 + monolithic = false; 12470 + client = true; 12471 + tag = "-client-kf5"; 12472 + }; 12473 + 12474 quirc = callPackage ../tools/graphics/quirc {}; 12475 12476 quodlibet = callPackage ../applications/audio/quodlibet {