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