Merge pull request #73876 from jtojnar/phonon-backends
Fix Plasma NixOS tests
This commit is contained in:
commit
9995881b79
@ -13,9 +13,7 @@
|
|||||||
<para>
|
<para>
|
||||||
It sets <xref linkend="opt-services.xserver.enable"/>,
|
It sets <xref linkend="opt-services.xserver.enable"/>,
|
||||||
<xref linkend="opt-services.xserver.displayManager.sddm.enable"/>,
|
<xref linkend="opt-services.xserver.displayManager.sddm.enable"/>,
|
||||||
<xref linkend="opt-services.xserver.desktopManager.plasma5.enable"/> (
|
<xref linkend="opt-services.xserver.desktopManager.plasma5.enable"/>, and
|
||||||
<link linkend="opt-services.xserver.desktopManager.plasma5.enableQt4Support">
|
|
||||||
without Qt4 Support</link>), and
|
|
||||||
<xref linkend="opt-services.xserver.libinput.enable"/> to true. It also
|
<xref linkend="opt-services.xserver.libinput.enable"/> to true. It also
|
||||||
includes glxinfo and firefox in the system packages list.
|
includes glxinfo and firefox in the system packages list.
|
||||||
</para>
|
</para>
|
||||||
|
@ -171,6 +171,11 @@
|
|||||||
setting <literal>serviceConfig.PrivateTmp</literal> to <literal>false</literal> for each phpfpm unit.
|
setting <literal>serviceConfig.PrivateTmp</literal> to <literal>false</literal> for each phpfpm unit.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
KDE’s old multimedia framework Phonon no longer supports Qt 4. For that reason, Plasma desktop also does not have <option>enableQt4Support</option> option any more.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ with lib;
|
|||||||
services.xserver = {
|
services.xserver = {
|
||||||
desktopManager.plasma5 = {
|
desktopManager.plasma5 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableQt4Support = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Automatically login as nixos.
|
# Automatically login as nixos.
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
displayManager.sddm.enable = true;
|
displayManager.sddm.enable = true;
|
||||||
desktopManager.plasma5 = {
|
desktopManager.plasma5 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableQt4Support = false;
|
|
||||||
};
|
};
|
||||||
libinput.enable = true; # for touchpad support on many laptops
|
libinput.enable = true; # for touchpad support on many laptops
|
||||||
};
|
};
|
||||||
|
@ -27,20 +27,13 @@ in
|
|||||||
example = "vlc";
|
example = "vlc";
|
||||||
description = "Phonon audio backend to install.";
|
description = "Phonon audio backend to install.";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableQt4Support = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = true;
|
|
||||||
description = ''
|
|
||||||
Enable support for Qt 4-based applications. Particularly, install a
|
|
||||||
default backend for Phonon.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
(mkRemovedOptionModule [ "services" "xserver" "desktopManager" "plasma5" "enableQt4Support" ] "Phonon no longer supports Qt 4.")
|
||||||
|
];
|
||||||
|
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
(mkIf cfg.enable {
|
(mkIf cfg.enable {
|
||||||
@ -173,9 +166,7 @@ in
|
|||||||
|
|
||||||
# Phonon audio backend
|
# Phonon audio backend
|
||||||
++ lib.optional (cfg.phononBackend == "gstreamer") libsForQt5.phonon-backend-gstreamer
|
++ lib.optional (cfg.phononBackend == "gstreamer") libsForQt5.phonon-backend-gstreamer
|
||||||
++ lib.optional (cfg.phononBackend == "gstreamer" && cfg.enableQt4Support) pkgs.phonon-backend-gstreamer
|
|
||||||
++ lib.optional (cfg.phononBackend == "vlc") libsForQt5.phonon-backend-vlc
|
++ lib.optional (cfg.phononBackend == "vlc") libsForQt5.phonon-backend-vlc
|
||||||
++ lib.optional (cfg.phononBackend == "vlc" && cfg.enableQt4Support) pkgs.phonon-backend-vlc
|
|
||||||
|
|
||||||
# Optional hardware support features
|
# Optional hardware support features
|
||||||
++ lib.optionals config.hardware.bluetooth.enable [ bluedevil bluez-qt ]
|
++ lib.optionals config.hardware.bluetooth.enable [ bluedevil bluez-qt ]
|
||||||
|
@ -1,21 +1,13 @@
|
|||||||
{ stdenv, lib, fetchurl, cmake, gst_all_1, phonon, pkgconfig
|
{ stdenv, lib, fetchurl, cmake, gst_all_1, phonon, pkgconfig
|
||||||
, extra-cmake-modules, qtbase ? null, qtx11extras ? null, qt4 ? null
|
, extra-cmake-modules, qttools, qtbase, qtx11extras
|
||||||
, withQt5 ? false
|
|
||||||
, debug ? false
|
, debug ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
stdenv.mkDerivation rec {
|
||||||
v = "4.9.0";
|
|
||||||
pname = "phonon-backend-gstreamer";
|
pname = "phonon-backend-gstreamer";
|
||||||
in
|
version = "4.10.0";
|
||||||
|
|
||||||
assert withQt5 -> qtbase != null;
|
|
||||||
assert withQt5 -> qtx11extras != null;
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "${pname}-${if withQt5 then "qt5" else "qt4"}-${v}";
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://phonon.kde.org/;
|
homepage = https://phonon.kde.org/;
|
||||||
@ -26,8 +18,8 @@ stdenv.mkDerivation {
|
|||||||
};
|
};
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://kde/stable/phonon/${pname}/${v}/${pname}-${v}.tar.xz";
|
url = "mirror://kde/stable/phonon/${pname}/${version}/${pname}-${version}.tar.xz";
|
||||||
sha256 = "1wc5p1rqglf0n1avp55s50k7fjdzdrhg0gind15k8796w7nfbhyf";
|
sha256 = "1wk1ip2w7fkh65zk6rilj314dna0hgsv2xhjmpr5w08xa8sii1y5";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Hardcode paths to useful plugins so the backend doesn't depend
|
# Hardcode paths to useful plugins so the backend doesn't depend
|
||||||
@ -52,17 +44,26 @@ stdenv.mkDerivation {
|
|||||||
''-DGST_PLUGIN_PATH_1_0="${gstPluginPaths}"''
|
''-DGST_PLUGIN_PATH_1_0="${gstPluginPaths}"''
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = with gst_all_1;
|
buildInputs = with gst_all_1; [
|
||||||
[ gstreamer gst-plugins-base phonon ]
|
gstreamer
|
||||||
++ (if withQt5 then [ qtbase qtx11extras ] else [ qt4 ]);
|
gst-plugins-base
|
||||||
|
phonon
|
||||||
|
qtbase
|
||||||
|
qtx11extras
|
||||||
|
];
|
||||||
|
|
||||||
# cleanup: the build system creates (empty) $out/$out/share/icons (double prefix)
|
# cleanup: the build system creates (empty) $out/$out/share/icons (double prefix)
|
||||||
# if DESTDIR is unset
|
# if DESTDIR is unset
|
||||||
DESTDIR="/";
|
DESTDIR="/";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkgconfig ] ++ optional withQt5 extra-cmake-modules;
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
pkgconfig
|
||||||
|
extra-cmake-modules
|
||||||
|
qttools
|
||||||
|
];
|
||||||
|
|
||||||
cmakeFlags =
|
cmakeFlags = [
|
||||||
[ "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}" ]
|
"-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}"
|
||||||
++ optional withQt5 "-DPHONON_BUILD_PHONON4QT5=ON";
|
];
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,13 @@
|
|||||||
{ stdenv, lib, fetchurl, cmake, phonon, pkgconfig, vlc
|
{ stdenv, lib, fetchurl, cmake, phonon, pkgconfig, vlc
|
||||||
, extra-cmake-modules, qtbase ? null, qtx11extras ? null, qt4 ? null
|
, extra-cmake-modules, qttools, qtbase, qtx11extras
|
||||||
, withQt4 ? false
|
|
||||||
, debug ? false
|
, debug ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
stdenv.mkDerivation rec {
|
||||||
v = "0.10.2";
|
|
||||||
pname = "phonon-backend-vlc";
|
pname = "phonon-backend-vlc";
|
||||||
in
|
version = "0.11.1";
|
||||||
|
|
||||||
assert withQt4 -> qt4 != null;
|
|
||||||
assert !withQt4 -> qtbase != null;
|
|
||||||
assert !withQt4 -> qtx11extras != null;
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "${pname}-${if withQt4 then "qt4" else "qt5"}-${v}";
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://phonon.kde.org/;
|
homepage = https://phonon.kde.org/;
|
||||||
@ -26,17 +17,25 @@ stdenv.mkDerivation {
|
|||||||
};
|
};
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://kde/stable/phonon/${pname}/${v}/${pname}-${v}.tar.xz";
|
url = "mirror://kde/stable/phonon/${pname}/${version}/${pname}-${version}.tar.xz";
|
||||||
sha256 = "163jqq5p9n0yfw2fqk0cqn3c6mqycxsvc4956zhkw5345g81a2a9";
|
sha256 = "1vp52i5996khpxs233an7mlrzdji50gcs58ig8nrwfwlgyb1xnfc";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs =
|
buildInputs = [
|
||||||
[ phonon vlc ]
|
phonon
|
||||||
++ (if withQt4 then [ qt4 ] else [ qtbase qtx11extras ]);
|
vlc
|
||||||
|
qtbase
|
||||||
|
qtx11extras
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkgconfig ] ++ optional (!withQt4) extra-cmake-modules;
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
pkgconfig
|
||||||
|
qttools
|
||||||
|
extra-cmake-modules
|
||||||
|
];
|
||||||
|
|
||||||
cmakeFlags =
|
cmakeFlags = [
|
||||||
[ "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}" ]
|
"-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}"
|
||||||
++ optional (!withQt4) "-DPHONON_BUILD_PHONON4QT5=ON";
|
];
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,17 @@
|
|||||||
{ stdenv, lib, fetchurl, cmake, libGLU_combined, pkgconfig, libpulseaudio
|
{ stdenv, lib, fetchurl, cmake, libGLU_combined, pkgconfig, libpulseaudio
|
||||||
, qt4 ? null, extra-cmake-modules ? null, qtbase ? null, qttools ? null
|
, extra-cmake-modules, qtbase, qttools
|
||||||
, withQt5 ? false
|
|
||||||
, debug ? false }:
|
, debug ? false }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
v = "4.11.1";
|
soname = "phonon4qt5";
|
||||||
|
|
||||||
soname = if withQt5 then "phonon4qt5" else "phonon";
|
|
||||||
buildsystemdir = "share/cmake/${soname}";
|
buildsystemdir = "share/cmake/${soname}";
|
||||||
in
|
in
|
||||||
|
|
||||||
assert withQt5 -> qtbase != null;
|
stdenv.mkDerivation rec {
|
||||||
assert withQt5 -> qttools != null;
|
pname = "phonon";
|
||||||
|
version = "4.11.1";
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "phonon-${if withQt5 then "qt5" else "qt4"}-${v}";
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = https://phonon.kde.org/;
|
homepage = https://phonon.kde.org/;
|
||||||
@ -27,25 +22,30 @@ stdenv.mkDerivation {
|
|||||||
};
|
};
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://kde/stable/phonon/${v}/phonon-${v}.tar.xz";
|
url = "mirror://kde/stable/phonon/${version}/phonon-${version}.tar.xz";
|
||||||
sha256 = "0bfy8iqmjhlg3ma3iqd3kxjc2zkzpjgashbpf5x17y0dc2i1whxl";
|
sha256 = "0bfy8iqmjhlg3ma3iqd3kxjc2zkzpjgashbpf5x17y0dc2i1whxl";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs =
|
buildInputs = [
|
||||||
[ libGLU_combined libpulseaudio ]
|
libGLU_combined
|
||||||
++ (if withQt5 then [ qtbase qttools ] else [ qt4 ]);
|
libpulseaudio
|
||||||
|
qtbase
|
||||||
|
qttools
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs =
|
nativeBuildInputs = [
|
||||||
[ cmake pkgconfig ]
|
cmake
|
||||||
++ optional withQt5 extra-cmake-modules;
|
pkgconfig
|
||||||
|
extra-cmake-modules
|
||||||
|
];
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-fPIC";
|
NIX_CFLAGS_COMPILE = "-fPIC";
|
||||||
|
|
||||||
cmakeFlags =
|
cmakeFlags = [
|
||||||
[ "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}" ]
|
"-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}"
|
||||||
++ optional withQt5 "-DPHONON_BUILD_PHONON4QT5=ON";
|
];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
cmakeFlags+=" -DPHONON_QT_MKSPECS_INSTALL_DIR=''${!outputDev}/mkspecs"
|
cmakeFlags+=" -DPHONON_QT_MKSPECS_INSTALL_DIR=''${!outputDev}/mkspecs"
|
||||||
@ -63,10 +63,8 @@ stdenv.mkDerivation {
|
|||||||
sed -i cmake/FindPhononInternal.cmake \
|
sed -i cmake/FindPhononInternal.cmake \
|
||||||
-e "/set(INCLUDE_INSTALL_DIR/ c set(INCLUDE_INSTALL_DIR \"''${!outputDev}/include\")"
|
-e "/set(INCLUDE_INSTALL_DIR/ c set(INCLUDE_INSTALL_DIR \"''${!outputDev}/include\")"
|
||||||
|
|
||||||
${optionalString withQt5 ''
|
|
||||||
sed -i cmake/FindPhononInternal.cmake \
|
sed -i cmake/FindPhononInternal.cmake \
|
||||||
-e "/set(PLUGIN_INSTALL_DIR/ c set(PLUGIN_INSTALL_DIR \"$qtPluginPrefix/..\")"
|
-e "/set(PLUGIN_INSTALL_DIR/ c set(PLUGIN_INSTALL_DIR \"$qtPluginPrefix/..\")"
|
||||||
''}
|
|
||||||
|
|
||||||
sed -i CMakeLists.txt \
|
sed -i CMakeLists.txt \
|
||||||
-e "/set(BUILDSYSTEM_INSTALL_DIR/ c set(BUILDSYSTEM_INSTALL_DIR \"''${!outputDev}/${buildsystemdir}\")"
|
-e "/set(BUILDSYSTEM_INSTALL_DIR/ c set(BUILDSYSTEM_INSTALL_DIR \"''${!outputDev}/${buildsystemdir}\")"
|
||||||
|
@ -309,6 +309,9 @@ mapAliases ({
|
|||||||
procps-ng = procps; # added 2018-06-08
|
procps-ng = procps; # added 2018-06-08
|
||||||
pyo3-pack = maturin;
|
pyo3-pack = maturin;
|
||||||
pulseaudioLight = pulseaudio; # added 2018-04-25
|
pulseaudioLight = pulseaudio; # added 2018-04-25
|
||||||
|
phonon-backend-gstreamer = throw "Please use libsForQt5.phonon-backend-gstreamer, as Qt4 support in this package has been removed."; # added 2019-11-22
|
||||||
|
phonon-backend-vlc = throw "Please use libsForQt5.phonon-backend-vlc, as Qt4 support in this package has been removed."; # added 2019-11-22
|
||||||
|
phonon = throw "Please use libsForQt5.phonon, as Qt4 support in this package has been removed."; # added 2019-11-22
|
||||||
qca-qt5 = libsForQt5.qca-qt5; # added 2015-12-19
|
qca-qt5 = libsForQt5.qca-qt5; # added 2015-12-19
|
||||||
quake3game = ioquake3; # added 2016-01-14
|
quake3game = ioquake3; # added 2016-01-14
|
||||||
qwt6 = libsForQt5.qwt; # added 2015-12-19
|
qwt6 = libsForQt5.qwt; # added 2015-12-19
|
||||||
|
@ -13412,15 +13412,6 @@ in
|
|||||||
|
|
||||||
pdf2xml = callPackage ../development/libraries/pdf2xml {} ;
|
pdf2xml = callPackage ../development/libraries/pdf2xml {} ;
|
||||||
|
|
||||||
phonon = callPackage ../development/libraries/phonon {};
|
|
||||||
|
|
||||||
phonon-backend-gstreamer = callPackage ../development/libraries/phonon/backends/gstreamer.nix {};
|
|
||||||
|
|
||||||
# TODO(@Ma27) get rid of that as soon as QT4 can be dropped
|
|
||||||
phonon-backend-vlc = callPackage ../development/libraries/phonon/backends/vlc.nix {
|
|
||||||
withQt4 = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
inherit (callPackage ../development/libraries/physfs { })
|
inherit (callPackage ../development/libraries/physfs { })
|
||||||
physfs_2
|
physfs_2
|
||||||
physfs;
|
physfs;
|
||||||
@ -13705,13 +13696,9 @@ in
|
|||||||
|
|
||||||
openbr = callPackage ../development/libraries/openbr { };
|
openbr = callPackage ../development/libraries/openbr { };
|
||||||
|
|
||||||
phonon = callPackage ../development/libraries/phonon {
|
phonon = callPackage ../development/libraries/phonon { };
|
||||||
withQt5 = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
phonon-backend-gstreamer = callPackage ../development/libraries/phonon/backends/gstreamer.nix {
|
phonon-backend-gstreamer = callPackage ../development/libraries/phonon/backends/gstreamer.nix { };
|
||||||
withQt5 = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
phonon-backend-vlc = callPackage ../development/libraries/phonon/backends/vlc.nix { };
|
phonon-backend-vlc = callPackage ../development/libraries/phonon/backends/vlc.nix { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user