Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 81 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 glib 48 gtk3 49 qtbase 50 qtwayland 51 ] 52 ++ lib.optionals (!useQt6) [ 53 adwaita-qt 54 ] 55 ++ lib.optionals useQt6 [ 56 adwaita-qt6 57 ]; 58 59 # Qt setup hook complains about missing `wrapQtAppsHook` otherwise. 60 dontWrapQtApps = true; 61 62 cmakeFlags = [ 63 "-DGLIB_SCHEMAS_DIR=${glib.getSchemaPath gsettings-desktop-schemas}" 64 "-DQT_PLUGINS_DIR=${placeholder "out"}/${qtbase.qtPluginPrefix}" 65 ] 66 ++ lib.optionals useQt6 [ 67 "-DUSE_QT6=true" 68 ]; 69 70 passthru = { 71 updateScript = nix-update-script { }; 72 }; 73 74 meta = with lib; { 75 description = "QPlatformTheme for a better Qt application inclusion in GNOME"; 76 homepage = "https://github.com/FedoraQt/QGnomePlatform"; 77 license = licenses.lgpl21Plus; 78 maintainers = [ ]; 79 platforms = platforms.linux; 80 }; 81}