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";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "1.4.2";
|
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;
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "sha256-K/+SL52C+M2OC4NL+mhBnm/9BwH0KNNTGIDmPwuUwkM=";
|
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;
|
2023-08-22 20:05:09 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2021-05-20 23:08:51 +00:00
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|