linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / libraries / phonon / backends / gstreamer.nix
blob3e21415b4c77260f8cf0e31b14018a6ccfa89fa4
1 { stdenv, lib, fetchurl, cmake, gst_all_1, phonon, pkg-config
2 , extra-cmake-modules, qttools, qtbase, qtx11extras
3 , debug ? false
4 }:
6 with lib;
8 stdenv.mkDerivation rec {
9   pname = "phonon-backend-gstreamer";
10   version = "4.10.0";
12   meta = with lib; {
13     homepage = "https://phonon.kde.org/";
14     description = "GStreamer backend for Phonon";
15     platforms = platforms.linux;
16     maintainers = with maintainers; [ ttuegel ];
17     license = licenses.lgpl21;
18   };
20   src = fetchurl {
21     url = "mirror://kde/stable/phonon/${pname}/${version}/${pname}-${version}.tar.xz";
22     sha256 = "1wk1ip2w7fkh65zk6rilj314dna0hgsv2xhjmpr5w08xa8sii1y5";
23   };
25   # Hardcode paths to useful plugins so the backend doesn't depend
26   # on system paths being set.
27   patches = [ ./gst-plugin-paths.patch ];
29   dontWrapQtApps = true;
31   NIX_CFLAGS_COMPILE =
32     let gstPluginPaths =
33           lib.makeSearchPathOutput "lib" "/lib/gstreamer-1.0"
34           (with gst_all_1; [
35             gstreamer
36             gst-plugins-base
37             gst-plugins-good
38             gst-plugins-ugly
39             gst-plugins-bad
40             gst-libav
41           ]);
42     in toString [
43       # This flag should be picked up through pkg-config, but it isn't.
44       "-I${gst_all_1.gstreamer.dev}/lib/gstreamer-1.0/include"
46       ''-DGST_PLUGIN_PATH_1_0="${gstPluginPaths}"''
47     ];
49   buildInputs = with gst_all_1; [
50     gstreamer
51     gst-plugins-base
52     phonon
53     qtbase
54     qtx11extras
55   ];
57   nativeBuildInputs = [
58     cmake
59     pkg-config
60     extra-cmake-modules
61     qttools
62   ];
64   cmakeFlags = [
65     "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}"
66   ];