libsForQt5.qtcurve: fix build with Qt5.15

moved the initial qtcurve package to mkLibsForQt5 function
to decouple from Qt5 version

added an alias qtcurve -> libsForQt5.qtcurve for backward compatibility

add option to disable gtk2 support (still enabled by default)
This commit is contained in:
freezeboy 2020-11-07 13:10:39 +01:00
parent bb18d1dcf1
commit 38b041bdf8
3 changed files with 24 additions and 14 deletions

View File

@ -1,43 +1,47 @@
{ stdenv, fetchFromGitHub, cmake, extra-cmake-modules, pkgconfig, mkDerivation
, gtk2, qtbase, qtsvg, qtx11extras # Toolkit dependencies
{ lib, fetchFromGitHub, cmake, extra-cmake-modules, pkgconfig, mkDerivation
, gtk2Support ? true, gtk2
, qtbase, qtsvg, qtx11extras # Toolkit dependencies
, karchive, kconfig, kconfigwidgets, kio, frameworkintegration
, kguiaddons, ki18n, kwindowsystem, kdelibs4support, kiconthemes
, libpthreadstubs, pcre, libXdmcp, libX11, libXau # X11 dependencies
, fetchpatch
}:
let
version = "1.9.1";
in mkDerivation {
mkDerivation rec {
pname = "qtcurve";
inherit version;
version = "1.9.1";
src = fetchFromGitHub {
owner = "KDE";
repo = "qtcurve";
rev = version;
sha256 = "0sm1fza68mwl9cvid4h2lsyxq5svia86l5v9wqk268lmx16mbzsw";
sha256 = "XP9VTeiVIiMm5mkXapCKWxfcvaYCkhY3S5RXZNR3oWo=";
};
enableParallelBuilding = true;
patches = [
# Remove unnecessary constexpr, this is not allowed in C++14
(fetchpatch {
url = "https://github.com/KDE/qtcurve/commit/ee2228ea2f18ac5da9b434ee6089381df815aa94.patch";
sha256 = "1vz5frsrsps93awn84gk8d7injrqfcyhc1rji6s0gsgsp5z9sl34";
})
# Fix build with Qt5.15
(fetchpatch {
url = "https://github.com/KDE/qtcurve/commit/44e2a35ebb164dcab0bad1a9158b1219a3ff6504.patch";
sha256 = "5I2fTxKRJX0cJcyUvYHWZx369FKk6ti9Se7AfYmB9ek=";
})
];
enableParallelBuilding = true;
nativeBuildInputs = [ cmake extra-cmake-modules pkgconfig ];
buildInputs = [
gtk2
qtbase qtsvg qtx11extras
karchive kconfig kconfigwidgets kio kiconthemes kguiaddons ki18n
kwindowsystem kdelibs4support frameworkintegration
libpthreadstubs
pcre
libXdmcp libX11 libXau
];
] ++ lib.optional gtk2Support gtk2;
preConfigure = ''
for i in qt5/CMakeLists.txt qt5/config/CMakeLists.txt
@ -52,7 +56,12 @@ in mkDerivation {
patchShebangs tools/gen-version.sh
'';
meta = with stdenv.lib; {
configureFlags = [
"-DENABLE_GTK2=${if gtk2Support then "ON" else "OFF"}"
"-DENABLE_QT4=OFF"
];
meta = with lib; {
homepage = "https://github.com/QtCurve/qtcurve";
description = "Widget styles for Qt5/Plasma 5 and gtk2";
platforms = platforms.linux;

View File

@ -475,6 +475,7 @@ mapAliases ({
quake3game = ioquake3; # added 2016-01-14
qvim = throw "qvim has been removed."; # added 2020-08-31
qwt6 = libsForQt5.qwt; # added 2015-12-19
qtcurve = libsForQt5.qtcurve; # added 2020-11-07
qtpfsgui = throw "qtpfsgui is now luminanceHDR"; # added 2019-06-26
quaternion-git = throw "quaternion-git has been removed in favor of the stable version 'quaternion'"; # added 2020-04-09
rdf4store = throw "rdf4store has been removed from nixpkgs."; # added 2019-12-21

View File

@ -15380,6 +15380,8 @@ in
grantlee = callPackage ../development/libraries/grantlee/5 { };
qtcurve = callPackage ../data/themes/qtcurve {};
herqq = callPackage ../development/libraries/herqq { };
kdb = callPackage ../development/libraries/kdb { };
@ -19692,8 +19694,6 @@ in
qogir-theme = callPackage ../data/themes/qogir { };
qtcurve = libsForQt514.callPackage ../data/themes/qtcurve {};
redhat-official-fonts = callPackage ../data/fonts/redhat-official { };
route159 = callPackage ../data/fonts/route159 { };