2016-04-22 15:11:10 +02:00
|
|
|
{ stdenv, lib, fetchurl, cmake, phonon, pkgconfig, vlc
|
2016-07-29 17:29:41 +02:00
|
|
|
, extra-cmake-modules, qtbase ? null, qtx11extras ? null, qt4 ? null
|
2018-06-26 17:34:34 +02:00
|
|
|
, withQt4 ? false
|
2016-07-29 17:29:41 +02:00
|
|
|
, debug ? false
|
|
|
|
}:
|
2016-04-22 15:11:10 +02:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
2018-04-16 08:01:06 +02:00
|
|
|
v = "0.10.1";
|
2016-04-22 15:11:10 +02:00
|
|
|
pname = "phonon-backend-vlc";
|
|
|
|
in
|
|
|
|
|
2018-06-26 17:34:34 +02:00
|
|
|
assert withQt4 -> qt4 != null;
|
|
|
|
assert !withQt4 -> qtbase != null;
|
|
|
|
assert !withQt4 -> qtx11extras != null;
|
2016-04-22 15:11:10 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-06-26 17:34:34 +02:00
|
|
|
name = "${pname}-${if withQt4 then "qt4" else "qt5"}-${v}";
|
2016-04-22 15:11:10 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-08-22 20:50:04 +02:00
|
|
|
homepage = https://phonon.kde.org/;
|
2016-04-22 15:11:10 +02:00
|
|
|
description = "GStreamer backend for Phonon";
|
|
|
|
platforms = platforms.linux;
|
2018-10-25 22:19:19 +02:00
|
|
|
license = with licenses; [ bsd3 lgpl2Plus ];
|
2016-04-22 15:11:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
src = fetchurl {
|
2016-04-23 16:54:51 +02:00
|
|
|
url = "mirror://kde/stable/phonon/${pname}/${v}/${pname}-${v}.tar.xz";
|
2018-04-16 08:01:06 +02:00
|
|
|
sha256 = "0b87mzkw9fdkrwgnh1kw5i5wnrd05rl42hynlykb7cfymsk6v5h9";
|
2016-04-22 15:11:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs =
|
|
|
|
[ phonon vlc ]
|
2018-06-26 17:34:34 +02:00
|
|
|
++ (if withQt4 then [ qt4 ] else [ qtbase qtx11extras ]);
|
2016-04-22 15:11:10 +02:00
|
|
|
|
2018-06-26 17:34:34 +02:00
|
|
|
nativeBuildInputs = [ cmake pkgconfig ] ++ optional (!withQt4) extra-cmake-modules;
|
2016-04-22 15:11:10 +02:00
|
|
|
|
|
|
|
cmakeFlags =
|
|
|
|
[ "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}" ]
|
2018-06-26 17:34:34 +02:00
|
|
|
++ optional (!withQt4) "-DPHONON_BUILD_PHONON4QT5=ON";
|
2016-04-22 15:11:10 +02:00
|
|
|
}
|