Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 83 lines 1.7 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 nix-update-script, 6 cmake, 7 pkg-config, 8 adwaita-qt, 9 adwaita-qt6, 10 glib, 11 gtk3, 12 qtbase, 13 qtwayland, 14 replaceVars, 15 gsettings-desktop-schemas, 16 useQt6 ? false, 17}: 18 19stdenv.mkDerivation rec { 20 pname = "qgnomeplatform"; 21 version = "0.8.4"; 22 23 src = fetchFromGitHub { 24 owner = "FedoraQt"; 25 repo = "QGnomePlatform"; 26 rev = version; 27 sha256 = "sha256-DaIBtWmce+58OOhqFG5802c3EprBAtDXhjiSPIImoOM="; 28 }; 29 30 patches = [ 31 # Hardcode GSettings schema path to avoid crashes from missing schemas 32 (replaceVars ./hardcode-gsettings.patch { 33 gds_gsettings_path = glib.getSchemaPath gsettings-desktop-schemas; 34 }) 35 36 # Backport cursor fix for Qt6 apps 37 # Adjusted from https://github.com/FedoraQt/QGnomePlatform/pull/138 38 ./qt6-cursor-fix.patch 39 ]; 40 41 nativeBuildInputs = [ 42 cmake 43 pkg-config 44 ]; 45 46 buildInputs = 47 [ 48 glib 49 gtk3 50 qtbase 51 qtwayland 52 ] 53 ++ lib.optionals (!useQt6) [ 54 adwaita-qt 55 ] 56 ++ lib.optionals useQt6 [ 57 adwaita-qt6 58 ]; 59 60 # Qt setup hook complains about missing `wrapQtAppsHook` otherwise. 61 dontWrapQtApps = true; 62 63 cmakeFlags = 64 [ 65 "-DGLIB_SCHEMAS_DIR=${glib.getSchemaPath gsettings-desktop-schemas}" 66 "-DQT_PLUGINS_DIR=${placeholder "out"}/${qtbase.qtPluginPrefix}" 67 ] 68 ++ lib.optionals useQt6 [ 69 "-DUSE_QT6=true" 70 ]; 71 72 passthru = { 73 updateScript = nix-update-script { }; 74 }; 75 76 meta = with lib; { 77 description = "QPlatformTheme for a better Qt application inclusion in GNOME"; 78 homepage = "https://github.com/FedoraQt/QGnomePlatform"; 79 license = licenses.lgpl21Plus; 80 maintainers = [ ]; 81 platforms = platforms.linux; 82 }; 83}