summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2018-06-26 17:34:34 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2018-06-26 17:34:34 +0200
commit8d6502f8ca9bd59931de4d0f7d74c805b34f7d14 (patch)
tree709d69603049c1477ab0ca55158871e2a960a7f3
parent68bf1063f02d7c1e6b2caa7cf725b884f1865296 (diff)
downloadnixpkgs-8d6502f8ca9bd59931de4d0f7d74c805b34f7d14.tar
nixpkgs-8d6502f8ca9bd59931de4d0f7d74c805b34f7d14.tar.gz
nixpkgs-8d6502f8ca9bd59931de4d0f7d74c805b34f7d14.tar.bz2
nixpkgs-8d6502f8ca9bd59931de4d0f7d74c805b34f7d14.tar.lz
nixpkgs-8d6502f8ca9bd59931de4d0f7d74c805b34f7d14.tar.xz
nixpkgs-8d6502f8ca9bd59931de4d0f7d74c805b34f7d14.tar.zst
nixpkgs-8d6502f8ca9bd59931de4d0f7d74c805b34f7d14.zip
phonon-backend-vlc: use qt5 by default
`minitube` is currently broken transitively due to the broken
`phonon-backend-qt4`: https://hydra.nixos.org/build/76523277

Although QT4 is fairly old, this package is still built with `qt4` ATM,
however QT5 is available as well. After this change, QT5 will be built
by default and in case anybody requires legacy QT4 it has to be enabled
explicitly like this:

```
with import <nixpkgs> { };
phonon-backend-vlc.override { withQt4 = true; }
```

Now the QT5-only build can be used (which fixes `minitube`) and there
are no confusions anymore with the build dependencies. Previously
`phonon-backend-vlc` and `libsForQt5.phonon-backend-vlc` used `qt4` by
default which was likely responsible for broken `minitube`.
-rw-r--r--pkgs/development/libraries/phonon/backends/vlc.nix15
-rw-r--r--pkgs/top-level/all-packages.nix5
2 files changed, 12 insertions, 8 deletions
diff --git a/pkgs/development/libraries/phonon/backends/vlc.nix b/pkgs/development/libraries/phonon/backends/vlc.nix
index 643e36ba6cd..0487886a896 100644
--- a/pkgs/development/libraries/phonon/backends/vlc.nix
+++ b/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
 }:
 
@@ -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/;
@@ -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";
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 50736caab83..d4a437ebabe 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -11192,7 +11192,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