Skip to content

Commit

Permalink
Merge pull request #42586 from Ma27/phonon-qt5-by-default
Browse files Browse the repository at this point in the history
phonon-backend-vlc: use qt5 by default
  • Loading branch information
xeji committed Jun 26, 2018
2 parents a627399 + d856022 commit 6c0427e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions pkgs/applications/audio/tomahawk/default.nix
Expand Up @@ -51,5 +51,6 @@ stdenv.mkDerivation rec {
homepage = http://tomahawk-player.org/;
license = licenses.gpl3Plus;
platforms = platforms.all;
broken = true; # 2018-06-25
};
}
15 changes: 8 additions & 7 deletions pkgs/development/libraries/phonon/backends/vlc.nix
@@ -1,6 +1,6 @@
{ stdenv, lib, fetchurl, cmake, phonon, pkgconfig, vlc
, extra-cmake-modules, qtbase ? null, qtx11extras ? null, qt4 ? null
, withQt5 ? false
, withQt4 ? false
, debug ? false
}:

Expand All @@ -11,11 +11,12 @@ let
pname = "phonon-backend-vlc";
in

assert withQt5 -> qtbase != null;
assert withQt5 -> qtx11extras != null;
assert withQt4 -> qt4 != null;
assert !withQt4 -> qtbase != null;
assert !withQt4 -> qtx11extras != null;

stdenv.mkDerivation rec {
name = "${pname}-${if withQt5 then "qt5" else "qt4"}-${v}";
name = "${pname}-${if withQt4 then "qt4" else "qt5"}-${v}";

meta = with stdenv.lib; {
homepage = https://phonon.kde.org/;
Expand All @@ -30,11 +31,11 @@ stdenv.mkDerivation rec {

buildInputs =
[ phonon vlc ]
++ (if withQt5 then [ qtbase qtx11extras ] else [ qt4 ]);
++ (if withQt4 then [ qt4 ] else [ qtbase qtx11extras ]);

nativeBuildInputs = [ cmake pkgconfig ] ++ optional withQt5 extra-cmake-modules;
nativeBuildInputs = [ cmake pkgconfig ] ++ optional (!withQt4) extra-cmake-modules;

cmakeFlags =
[ "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}" ]
++ optional withQt5 "-DPHONON_BUILD_PHONON4QT5=ON";
++ optional (!withQt4) "-DPHONON_BUILD_PHONON4QT5=ON";
}
5 changes: 4 additions & 1 deletion pkgs/top-level/all-packages.nix
Expand Up @@ -11196,7 +11196,10 @@ with pkgs;

phonon-backend-gstreamer = callPackage ../development/libraries/phonon/backends/gstreamer.nix {};

phonon-backend-vlc = callPackage ../development/libraries/phonon/backends/vlc.nix {};
# TODO(@Ma27) get rid of that as soon as QT4 can be dropped
phonon-backend-vlc = callPackage ../development/libraries/phonon/backends/vlc.nix {
withQt4 = true;
};

inherit (callPackage ../development/libraries/physfs { })
physfs_2
Expand Down

0 comments on commit 6c0427e

Please sign in to comment.