depot/third_party/nixpkgs/pkgs/development/libraries/qtstyleplugin-kvantum/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

56 lines
1.4 KiB
Nix

{ lib, stdenv, fetchFromGitHub, fetchpatch, qmake, qtbase, qtsvg, qtx11extras, kwindowsystem
, libX11, libXext, qttools, wrapQtAppsHook
, gitUpdater
}:
stdenv.mkDerivation rec {
pname = "qtstyleplugin-kvantum";
version = "1.0.4";
src = fetchFromGitHub {
owner = "tsujan";
repo = "Kvantum";
rev = "V${version}";
sha256 = "chdtcx73mfr/b1P3yVevx0m7HkMFzEYG7YLuhSyG7rk=";
};
nativeBuildInputs = [
qmake qttools wrapQtAppsHook
];
buildInputs = [
qtbase qtsvg qtx11extras kwindowsystem libX11 libXext
];
sourceRoot = "source/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 {
inherit pname version;
attrPath = "libsForQt5.${pname}";
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;
broken = lib.versionOlder qtbase.version "5.14";
maintainers = [ maintainers.romildo ];
};
}