2021-01-19 06:50:56 +00:00
|
|
|
{ stdenv, lib, fetchurl, cmake, gst_all_1, phonon, pkg-config
|
2019-11-21 20:08:05 +00:00
|
|
|
, extra-cmake-modules, qttools, qtbase, qtx11extras
|
2016-07-29 16:29:41 +01:00
|
|
|
, debug ? false
|
|
|
|
}:
|
2016-04-21 20:33:04 +01:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2019-11-21 20:08:05 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2016-04-21 20:33:04 +01:00
|
|
|
pname = "phonon-backend-gstreamer";
|
2019-11-21 20:08:05 +00:00
|
|
|
version = "4.10.0";
|
2016-04-21 20:33:04 +01:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://phonon.kde.org/";
|
2016-04-21 20:33:04 +01:00
|
|
|
description = "GStreamer backend for Phonon";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ ttuegel ];
|
2018-10-25 21:16:40 +01:00
|
|
|
license = licenses.lgpl21;
|
2016-04-21 20:33:04 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
src = fetchurl {
|
2019-11-21 20:08:05 +00:00
|
|
|
url = "mirror://kde/stable/phonon/${pname}/${version}/${pname}-${version}.tar.xz";
|
|
|
|
sha256 = "1wk1ip2w7fkh65zk6rilj314dna0hgsv2xhjmpr5w08xa8sii1y5";
|
2016-04-21 20:33:04 +01:00
|
|
|
};
|
|
|
|
|
2017-03-04 01:21:23 +00:00
|
|
|
# Hardcode paths to useful plugins so the backend doesn't depend
|
|
|
|
# on system paths being set.
|
|
|
|
patches = [ ./gst-plugin-paths.patch ];
|
|
|
|
|
2021-01-12 11:50:23 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2017-03-04 01:21:23 +00:00
|
|
|
NIX_CFLAGS_COMPILE =
|
|
|
|
let gstPluginPaths =
|
|
|
|
lib.makeSearchPathOutput "lib" "/lib/gstreamer-1.0"
|
|
|
|
(with gst_all_1; [
|
|
|
|
gstreamer
|
|
|
|
gst-plugins-base
|
|
|
|
gst-plugins-good
|
|
|
|
gst-plugins-ugly
|
|
|
|
gst-plugins-bad
|
|
|
|
gst-libav
|
|
|
|
]);
|
2019-10-30 01:29:30 +00:00
|
|
|
in toString [
|
2021-01-19 06:50:56 +00:00
|
|
|
# This flag should be picked up through pkg-config, but it isn't.
|
2017-03-04 01:21:23 +00:00
|
|
|
"-I${gst_all_1.gstreamer.dev}/lib/gstreamer-1.0/include"
|
|
|
|
|
|
|
|
''-DGST_PLUGIN_PATH_1_0="${gstPluginPaths}"''
|
|
|
|
];
|
|
|
|
|
2019-11-21 20:08:05 +00:00
|
|
|
buildInputs = with gst_all_1; [
|
|
|
|
gstreamer
|
|
|
|
gst-plugins-base
|
|
|
|
phonon
|
|
|
|
qtbase
|
|
|
|
qtx11extras
|
|
|
|
];
|
2016-04-21 20:33:04 +01:00
|
|
|
|
2019-11-21 20:08:05 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2019-11-21 20:08:05 +00:00
|
|
|
extra-cmake-modules
|
|
|
|
qttools
|
|
|
|
];
|
2016-04-21 20:33:04 +01:00
|
|
|
|
2019-11-21 20:08:05 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}"
|
|
|
|
];
|
2016-04-21 20:33:04 +01:00
|
|
|
}
|