1 { lib, stdenv, fetchFromGitLab, pkg-config
2 , qmake, qtbase, qtdeclarative, wrapQtAppsHook
3 , glib, gobject-introspection
7 stdenv.mkDerivation rec {
8 pname = "gsettings-qt";
11 src = fetchFromGitLab {
16 sha256 = "14l8xphw4jd9ckqba13cyxq0i362x8lfsd0zlfawwi2z1q1vqm92";
32 # force ordered build of subdirs
33 sed -i -e "\$aCONFIG += ordered" gsettings-qt.pro
35 # It seems that there is a bug in qtdeclarative: qmlplugindump fails
36 # because it can not find or load the Qt platform plugin "minimal".
37 # A workaround is to set QT_PLUGIN_PATH and QML2_IMPORT_PATH explicitly.
38 export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix}
39 export QML2_IMPORT_PATH=${qtdeclarative.bin}/${qtbase.qtQmlPrefix}
41 substituteInPlace GSettings/gsettings-qt.pro \
42 --replace '$$[QT_INSTALL_QML]' "$out/$qtQmlPrefix" \
43 --replace '$$[QT_INSTALL_BINS]/qmlplugindump' "qmlplugindump"
45 substituteInPlace src/gsettings-qt.pro \
46 --replace '$$[QT_INSTALL_LIBS]' "$out/lib" \
47 --replace '$$[QT_INSTALL_HEADERS]' "$out/include"
51 # do not install tests
52 for f in tests/Makefile{,.cpptest}; do
53 substituteInPlace $f \
54 --replace "install: install_target" "install: "
58 passthru.updateScript = gitUpdater {
63 description = "Library to access GSettings from Qt";
64 homepage = "https://gitlab.com/ubports/core/gsettings-qt";
65 license = licenses.lgpl3;
66 platforms = platforms.linux;
67 maintainers = [ maintainers.romildo ];