2022-09-22 12:36:57 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, qmake
|
|
|
|
, qtbase
|
|
|
|
, qtsvg
|
2023-07-15 17:15:38 +00:00
|
|
|
, qtx11extras ? null
|
|
|
|
, kwindowsystem ? null
|
|
|
|
, qtwayland
|
2022-09-22 12:36:57 +00:00
|
|
|
, libX11
|
|
|
|
, libXext
|
|
|
|
, qttools
|
|
|
|
, wrapQtAppsHook
|
2022-06-16 17:23:12 +00:00
|
|
|
, gitUpdater
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
, qt5Kvantum ? null
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
isQt6 = lib.versionAtLeast qtbase.version "6";
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2023-10-09 19:29:22 +00:00
|
|
|
pname = "qtstyleplugin-kvantum${lib.optionalString isQt6 "6"}";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "1.0.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tsujan";
|
|
|
|
repo = "Kvantum";
|
|
|
|
rev = "V${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "48Blio8qHLmXSKG0c1tphXSfiwQXs0Xqwxe187nM3Ro=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2022-09-22 12:36:57 +00:00
|
|
|
qmake
|
|
|
|
qttools
|
|
|
|
wrapQtAppsHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2021-12-30 13:39:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2022-09-22 12:36:57 +00:00
|
|
|
qtbase
|
|
|
|
qtsvg
|
|
|
|
libX11
|
|
|
|
libXext
|
2023-10-09 19:29:22 +00:00
|
|
|
] ++ lib.optionals (!isQt6) [ qtx11extras kwindowsystem ]
|
|
|
|
++ lib.optional isQt6 qtwayland;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/Kvantum";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# add xdg dirs support
|
|
|
|
url = "https://github.com/tsujan/Kvantum/commit/01989083f9ee75a013c2654e760efd0a1dea4a68.patch";
|
|
|
|
hash = "sha256-HPx+p4Iek/Me78olty1fA0dUNceK7bwOlTYIcQu8ycc=";
|
|
|
|
stripLen = 1;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Fix plugin dir
|
|
|
|
substituteInPlace style/style.pro \
|
|
|
|
--replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix"
|
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
postInstall = lib.optionalString isQt6 ''
|
|
|
|
# make default Kvantum themes available for Qt 6 apps
|
|
|
|
mkdir -p "$out/share"
|
|
|
|
ln -s "${qt5Kvantum}/share/Kvantum" "$out/share/Kvantum"
|
|
|
|
'';
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
passthru.updateScript = gitUpdater {
|
|
|
|
rev-prefix = "V";
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "SVG-based Qt5 theme engine plus a config tool and extra themes";
|
|
|
|
homepage = "https://github.com/tsujan/Kvantum";
|
2021-08-05 21:33:18 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ romildo Scrumplex ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|