nixpkgs/pkgs/development/libraries/phonon/backends/vlc.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

2016-04-22 13:11:10 +00:00
{ stdenv, lib, fetchurl, cmake, phonon, pkgconfig, vlc
, extra-cmake-modules, qtbase ? null, qtx11extras ? null, qt4 ? null
, withQt4 ? false
, 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
assert withQt4 -> qt4 != null;
assert !withQt4 -> qtbase != null;
assert !withQt4 -> qtx11extras != null;
2016-04-22 13:11:10 +00:00
stdenv.mkDerivation rec {
name = "${pname}-${if withQt4 then "qt4" else "qt5"}-${v}";
2016-04-22 13:11:10 +00:00
meta = with stdenv.lib; {
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 ]
++ (if withQt4 then [ qt4 ] else [ qtbase qtx11extras ]);
2016-04-22 13:11:10 +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"}" ]
++ optional (!withQt4) "-DPHONON_BUILD_PHONON4QT5=ON";
2016-04-22 13:11:10 +00:00
}