Files
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

88 lines
1.8 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
nix-update-script,
cmake,
pkg-config,
adwaita-qt,
adwaita-qt6,
glib,
gtk3,
qtbase,
qtwayland,
replaceVars,
gsettings-desktop-schemas,
useQt6 ? false,
}:
stdenv.mkDerivation rec {
pname = "qgnomeplatform";
version = "0.8.4";
src = fetchFromGitHub {
owner = "FedoraQt";
repo = "QGnomePlatform";
rev = version;
sha256 = "sha256-DaIBtWmce+58OOhqFG5802c3EprBAtDXhjiSPIImoOM=";
};
patches = [
# Hardcode GSettings schema path to avoid crashes from missing schemas
(replaceVars ./hardcode-gsettings.patch {
gds_gsettings_path = glib.getSchemaPath gsettings-desktop-schemas;
})
# Backport cursor fix for Qt6 apps
# Adjusted from https://github.com/FedoraQt/QGnomePlatform/pull/138
./qt6-cursor-fix.patch
# fixing build with Qt>=6.10
./qt6_10.patch
];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
glib
gtk3
qtbase
qtwayland
]
++ lib.optionals (!useQt6) [
adwaita-qt
]
++ lib.optionals useQt6 [
adwaita-qt6
];
# Qt setup hook complains about missing `wrapQtAppsHook` otherwise.
dontWrapQtApps = true;
cmakeFlags = [
"-DGLIB_SCHEMAS_DIR=${glib.getSchemaPath gsettings-desktop-schemas}"
"-DQT_PLUGINS_DIR=${placeholder "out"}/${qtbase.qtPluginPrefix}"
# Workaround CMake 4 compat
(lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.31")
]
++ lib.optionals useQt6 [
"-DUSE_QT6=true"
];
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "QPlatformTheme for a better Qt application inclusion in GNOME";
homepage = "https://github.com/FedoraQt/QGnomePlatform";
license = lib.licenses.lgpl21Plus;
maintainers = [ ];
platforms = lib.platforms.linux;
};
}