build-bazel-package: added rm of extra local folders for toolchain configuration...
[NixPkgs.git] / pkgs / by-name / qa / qadwaitadecorations / package.nix
blobdfeb8bde1207962349b1ce298e11f1fe827ef9eb
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   cmake,
6   qt5,
7   qt6,
8   wayland,
9   nix-update-script,
10   useQt6 ? false,
12   # Shadows support on Qt5 requires the feature backported from Qt6:
13   # https://src.fedoraproject.org/rpms/qt5-qtwayland/blob/rawhide/f/qtwayland-decoration-support-backports-from-qt6.patch
14   qt5ShadowsSupport ? false,
17 let
18   qt = if useQt6 then qt6 else qt5;
19   qtVersion = if useQt6 then "6" else "5";
22 stdenv.mkDerivation (finalAttrs: {
23   pname = "qadwaitadecorations";
24   version = "0.1.6";
26   src = fetchFromGitHub {
27     owner = "FedoraQt";
28     repo = "QAdwaitaDecorations";
29     rev = finalAttrs.version;
30     hash = "sha256-ZU3cwFwQECh4Z6YcTzD2WooZmJ2nSUABYft3dfakSuY=";
31   };
33   nativeBuildInputs = [
34     cmake
35   ];
37   buildInputs = with qt; [
38     qtbase
39     qtsvg
40     qtwayland
41     wayland
42   ];
44   dontWrapQtApps = true;
46   cmakeFlags =
47     [
48       "-DQT_PLUGINS_DIR=${placeholder "out"}/${qt.qtbase.qtPluginPrefix}"
49     ]
50     ++ lib.optional useQt6 "-DUSE_QT6=true"
51     ++ lib.optional qt5ShadowsSupport "-DHAS_QT6_SUPPORT=true";
53   passthru.updateScript = nix-update-script { };
55   meta = {
56     description = "Qt${qtVersion} Wayland decoration plugin using libadwaita style";
57     homepage = "https://github.com/FedoraQt/QAdwaitaDecorations";
58     license = lib.licenses.lgpl21Plus;
59     maintainers = with lib.maintainers; [ samlukeyes123 ];
60     platforms = lib.platforms.linux;
61   };