@@ -0,0 +1,51 @@
1+{ stdenv, fetchurl, cmake, extra-cmake-modules, pkgconfig
2+, gtk2, qtbase, qtsvg, qtx11extras # Toolkit dependencies
3+, karchive, kconfig, kconfigwidgets, kio, frameworkintegration
4+, kguiaddons, ki18n, kwindowsystem, kdelibs4support, kiconthemes
5+, libpthreadstubs, pcre, libXdmcp, libX11, libXau # X11 dependencies
6+}:
7+
8+let
9+ version = "1.9";
10+in stdenv.mkDerivation {
11+ name = "qtcurve-${version}";
12+ src = fetchurl {
13+ url = "http://download.kde.org/stable/qtcurve/qtcurve-${version}.tar.xz";
14+ sha256 = "169gdny1cdld0qnx3nqvx568zjzdba4pwp3gxapc1hdh2cymw7r8";
15+ };
16+
17+ enableParallelBuilding = true;
18+
19+ nativeBuildInputs = [ cmake extra-cmake-modules pkgconfig ];
20+
21+ buildInputs = [
22+ gtk2
23+ qtbase qtsvg qtx11extras
24+ karchive kconfig kconfigwidgets kio kiconthemes kguiaddons ki18n
25+ kwindowsystem kdelibs4support frameworkintegration
26+ libpthreadstubs
27+ pcre
28+ libXdmcp libX11 libXau
29+ ];
30+
31+ preConfigure = ''
32+ for i in qt5/CMakeLists.txt qt5/config/CMakeLists.txt
33+ do
34+ substituteInPlace $i \
35+ --replace "{_Qt5_PLUGIN_INSTALL_DIR}" "{KDE_INSTALL_QTPLUGINDIR}"
36+ done
37+ substituteInPlace CMakeLists.txt \
38+ --replace \$\{GTK2_PREFIX\} $out
39+ substituteInPlace gtk2/style/CMakeLists.txt \
40+ --replace \$\{GTK2_LIBDIR\} $out/lib
41+ patchShebangs tools/gen-version.sh
42+ '';
43+
44+ meta = with stdenv.lib; {
45+ homepage = https://github.com/QtCurve/qtcurve;
46+ description = "Widget styles for Qt5/Plasma 5 and gtk2";
47+ platforms = platforms.linux;
48+ license = licenses.lgpl21Plus;
49+ maintainers = [ maintainers.gnidorah ];
50+ };
51+}