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

43 lines
1.1 KiB
Nix
Raw Normal View History

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