depot/third_party/nixpkgs/pkgs/development/libraries/qtstyleplugin-kvantum/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

71 lines
1.5 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, qmake
, qtbase
, qtsvg
, qtx11extras ? null
, kwindowsystem ? null
, qtwayland
, libX11
, libXext
, qttools
, wrapQtAppsHook
, gitUpdater
}:
stdenv.mkDerivation rec {
pname = "qtstyleplugin-kvantum";
version = "1.0.10";
src = fetchFromGitHub {
owner = "tsujan";
repo = "Kvantum";
rev = "V${version}";
sha256 = "48Blio8qHLmXSKG0c1tphXSfiwQXs0Xqwxe187nM3Ro=";
};
nativeBuildInputs = [
qmake
qttools
wrapQtAppsHook
];
buildInputs = [
qtbase
qtsvg
libX11
libXext
] ++ lib.optionals (lib.versionOlder qtbase.version "6") [ qtx11extras kwindowsystem ]
++ lib.optional (lib.versionAtLeast qtbase.version "6") qtwayland;
sourceRoot = "${src.name}/Kvantum";
patches = [
(fetchpatch {
# add xdg dirs support
url = "https://github.com/tsujan/Kvantum/commit/01989083f9ee75a013c2654e760efd0a1dea4a68.patch";
hash = "sha256-HPx+p4Iek/Me78olty1fA0dUNceK7bwOlTYIcQu8ycc=";
stripLen = 1;
})
];
postPatch = ''
# Fix plugin dir
substituteInPlace style/style.pro \
--replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix"
'';
passthru.updateScript = gitUpdater {
rev-prefix = "V";
};
meta = with lib; {
description = "SVG-based Qt5 theme engine plus a config tool and extra themes";
homepage = "https://github.com/tsujan/Kvantum";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ romildo Scrumplex ];
};
}