1{ mkDerivation
2, lib
3, fetchFromGitHub
4, nix-update-script
5, cmake
6, pkg-config
7, adwaita-qt
8, glib
9, gtk3
10, qtbase
11, pantheon
12, substituteAll
13, gsettings-desktop-schemas
14}:
15
16mkDerivation rec {
17 pname = "qgnomeplatform";
18 version = "0.8.0";
19
20 src = fetchFromGitHub {
21 owner = "FedoraQt";
22 repo = "QGnomePlatform";
23 rev = version;
24 sha256 = "C/n8i5j0UWfxhP10c4j89U+LrpPozXnam4fIPYMXZAA=";
25 };
26
27 patches = [
28 # Hardcode GSettings schema path to avoid crashes from missing schemas
29 (substituteAll {
30 src = ./hardcode-gsettings.patch;
31 gds_gsettings_path = glib.getSchemaPath gsettings-desktop-schemas;
32 })
33 ];
34
35 nativeBuildInputs = [
36 cmake
37 pkg-config
38 ];
39
40 buildInputs = [
41 adwaita-qt
42 glib
43 gtk3
44 qtbase
45 ];
46
47 cmakeFlags = [
48 "-DGLIB_SCHEMAS_DIR=${glib.getSchemaPath gsettings-desktop-schemas}"
49 "-DQT_PLUGINS_DIR=${placeholder "out"}/${qtbase.qtPluginPrefix}"
50 ];
51
52 passthru = {
53 updateScript = nix-update-script {
54 attrPath = pname;
55 };
56 };
57
58 meta = with lib; {
59 description = "QPlatformTheme for a better Qt application inclusion in GNOME";
60 homepage = "https://github.com/FedoraQt/QGnomePlatform";
61 license = licenses.lgpl21Plus;
62 maintainers = teams.gnome.members ++ (with maintainers; [ ]);
63 platforms = platforms.linux;
64 };
65}