2023-01-11 07:51:40 +00:00
|
|
|
{ stdenv
|
2021-05-20 23:08:51 +00:00
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nix-update-script
|
|
|
|
, cmake
|
|
|
|
, ninja
|
|
|
|
, qtbase
|
2023-01-11 07:51:40 +00:00
|
|
|
, qtwayland
|
2021-05-20 23:08:51 +00:00
|
|
|
, qt5
|
|
|
|
, xorg
|
2023-01-11 07:51:40 +00:00
|
|
|
, useQt6 ? false
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "adwaita-qt";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FedoraQt";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-t9vv1KcMUg8Qe7lhVMN4GO+VPoT7QzeoQ6hV4fesA8U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
ninja
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
2021-05-20 23:08:51 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
xorg.libxcb
|
2023-01-11 07:51:40 +00:00
|
|
|
] ++ lib.optionals (!useQt6) [
|
|
|
|
qt5.qtx11extras
|
|
|
|
] ++ lib.optionals useQt6 [
|
|
|
|
qtwayland
|
|
|
|
];
|
|
|
|
|
|
|
|
# Qt setup hook complains about missing `wrapQtAppsHook` otherwise.
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
|
|
|
cmakeFlags = lib.optionals useQt6 [
|
|
|
|
"-DUSE_QT6=true"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Fix plugin dir
|
2021-05-20 23:08:51 +00:00
|
|
|
substituteInPlace src/style/CMakeLists.txt \
|
2020-04-24 23:36:52 +00:00
|
|
|
--replace "DESTINATION \"\''${QT_PLUGINS_DIR}/styles" "DESTINATION \"$qtPluginPrefix/styles"
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
2022-12-28 21:21:41 +00:00
|
|
|
updateScript = nix-update-script { };
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A style to bend Qt applications to look like they belong into GNOME Shell";
|
|
|
|
homepage = "https://github.com/FedoraQt/adwaita-qt";
|
|
|
|
license = licenses.gpl2Plus;
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = teams.gnome.members ++ (with maintainers; [ ]);
|
|
|
|
platforms = platforms.all;
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin; # broken since 2021-12-05 on hydra, broken until qt515 will be used for darwin
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|