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