2021-01-17 03:14:13 +01:00
|
|
|
{ lib, fetchFromGitHub, cmake, extra-cmake-modules, pkg-config, mkDerivation
|
2020-11-07 13:10:39 +01:00
|
|
|
, gtk2Support ? true, gtk2
|
|
|
|
, qtbase, qtsvg, qtx11extras # Toolkit dependencies
|
2018-10-28 20:18:57 +01:00
|
|
|
, karchive, kconfig, kconfigwidgets, kio, frameworkintegration
|
|
|
|
, kguiaddons, ki18n, kwindowsystem, kdelibs4support, kiconthemes
|
|
|
|
, libpthreadstubs, pcre, libXdmcp, libX11, libXau # X11 dependencies
|
2019-12-30 13:19:43 +01:00
|
|
|
, fetchpatch
|
2018-10-28 20:18:57 +01:00
|
|
|
}:
|
|
|
|
|
2020-11-07 13:10:39 +01:00
|
|
|
mkDerivation rec {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "qtcurve";
|
2020-11-07 13:10:39 +01:00
|
|
|
version = "1.9.1";
|
2020-02-15 11:49:17 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KDE";
|
|
|
|
repo = "qtcurve";
|
|
|
|
rev = version;
|
2020-11-07 13:10:39 +01:00
|
|
|
sha256 = "XP9VTeiVIiMm5mkXapCKWxfcvaYCkhY3S5RXZNR3oWo=";
|
2018-10-28 20:18:57 +01:00
|
|
|
};
|
|
|
|
|
2019-12-30 13:19:43 +01:00
|
|
|
patches = [
|
2020-11-07 13:10:39 +01:00
|
|
|
# Remove unnecessary constexpr, this is not allowed in C++14
|
2019-12-30 13:19:43 +01:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/KDE/qtcurve/commit/ee2228ea2f18ac5da9b434ee6089381df815aa94.patch";
|
|
|
|
sha256 = "1vz5frsrsps93awn84gk8d7injrqfcyhc1rji6s0gsgsp5z9sl34";
|
|
|
|
})
|
2020-11-07 13:10:39 +01:00
|
|
|
# Fix build with Qt5.15
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/KDE/qtcurve/commit/44e2a35ebb164dcab0bad1a9158b1219a3ff6504.patch";
|
|
|
|
sha256 = "5I2fTxKRJX0cJcyUvYHWZx369FKk6ti9Se7AfYmB9ek=";
|
|
|
|
})
|
2019-12-30 13:19:43 +01:00
|
|
|
];
|
|
|
|
|
2021-01-17 03:14:13 +01:00
|
|
|
nativeBuildInputs = [ cmake extra-cmake-modules pkg-config ];
|
2018-10-28 20:18:57 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
qtbase qtsvg qtx11extras
|
|
|
|
karchive kconfig kconfigwidgets kio kiconthemes kguiaddons ki18n
|
|
|
|
kwindowsystem kdelibs4support frameworkintegration
|
|
|
|
libpthreadstubs
|
|
|
|
pcre
|
|
|
|
libXdmcp libX11 libXau
|
2020-11-07 13:10:39 +01:00
|
|
|
] ++ lib.optional gtk2Support gtk2;
|
2018-10-28 20:18:57 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
for i in qt5/CMakeLists.txt qt5/config/CMakeLists.txt
|
|
|
|
do
|
|
|
|
substituteInPlace $i \
|
|
|
|
--replace "{_Qt5_PLUGIN_INSTALL_DIR}" "{KDE_INSTALL_QTPLUGINDIR}"
|
|
|
|
done
|
|
|
|
substituteInPlace CMakeLists.txt \
|
|
|
|
--replace \$\{GTK2_PREFIX\} $out
|
|
|
|
substituteInPlace gtk2/style/CMakeLists.txt \
|
|
|
|
--replace \$\{GTK2_LIBDIR\} $out/lib
|
|
|
|
patchShebangs tools/gen-version.sh
|
|
|
|
'';
|
|
|
|
|
2020-11-07 13:10:39 +01:00
|
|
|
configureFlags = [
|
|
|
|
"-DENABLE_GTK2=${if gtk2Support then "ON" else "OFF"}"
|
|
|
|
"-DENABLE_QT4=OFF"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/QtCurve/qtcurve";
|
2018-10-28 20:18:57 +01:00
|
|
|
description = "Widget styles for Qt5/Plasma 5 and gtk2";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.lgpl21Plus;
|
2021-04-29 07:21:13 +02:00
|
|
|
maintainers = [ ];
|
2018-10-28 20:18:57 +01:00
|
|
|
};
|
|
|
|
}
|