depot/third_party/nixpkgs/pkgs/development/libraries/qgnomeplatform/default.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

83 lines
1.7 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
];
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}"
]
++ lib.optionals useQt6 [
"-DUSE_QT6=true"
];
passthru = {
updateScript = nix-update-script { };
};
meta = with lib; {
description = "QPlatformTheme for a better Qt application inclusion in GNOME";
homepage = "https://github.com/FedoraQt/QGnomePlatform";
license = licenses.lgpl21Plus;
maintainers = [ ];
platforms = platforms.linux;
};
}