2021-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv, fetchFromGitLab, pkg-config
|
2019-07-05 17:42:08 +02:00
|
|
|
, qmake, qtbase, qtdeclarative, wrapQtAppsHook
|
|
|
|
, glib, gobject-introspection
|
2022-02-21 02:11:49 +01:00
|
|
|
, gitUpdater
|
2019-07-05 17:42:08 +02:00
|
|
|
}:
|
2018-03-05 02:57:22 +01:00
|
|
|
|
2020-05-26 22:31:42 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "gsettings-qt";
|
2020-05-26 22:31:42 +02:00
|
|
|
version = "0.2";
|
2018-03-05 02:57:22 +01:00
|
|
|
|
2020-05-26 22:31:42 +02:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
group = "ubports";
|
|
|
|
owner = "core";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "14l8xphw4jd9ckqba13cyxq0i362x8lfsd0zlfawwi2z1q1vqm92";
|
2018-03-05 02:57:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-01-19 07:50:56 +01:00
|
|
|
pkg-config
|
2018-03-05 02:57:22 +01:00
|
|
|
qmake
|
2018-12-02 12:41:15 +01:00
|
|
|
gobject-introspection
|
2019-07-05 17:42:08 +02:00
|
|
|
wrapQtAppsHook
|
2018-03-05 02:57:22 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
qtdeclarative
|
|
|
|
];
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
# force ordered build of subdirs
|
|
|
|
sed -i -e "\$aCONFIG += ordered" gsettings-qt.pro
|
|
|
|
|
|
|
|
# It seems that there is a bug in qtdeclarative: qmlplugindump fails
|
|
|
|
# because it can not find or load the Qt platform plugin "minimal".
|
|
|
|
# A workaround is to set QT_PLUGIN_PATH and QML2_IMPORT_PATH explicitly.
|
|
|
|
export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix}
|
|
|
|
export QML2_IMPORT_PATH=${qtdeclarative.bin}/${qtbase.qtQmlPrefix}
|
|
|
|
|
|
|
|
substituteInPlace GSettings/gsettings-qt.pro \
|
|
|
|
--replace '$$[QT_INSTALL_QML]' "$out/$qtQmlPrefix" \
|
|
|
|
--replace '$$[QT_INSTALL_BINS]/qmlplugindump' "qmlplugindump"
|
|
|
|
|
|
|
|
substituteInPlace src/gsettings-qt.pro \
|
|
|
|
--replace '$$[QT_INSTALL_LIBS]' "$out/lib" \
|
|
|
|
--replace '$$[QT_INSTALL_HEADERS]' "$out/include"
|
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
# do not install tests
|
|
|
|
for f in tests/Makefile{,.cpptest}; do
|
|
|
|
substituteInPlace $f \
|
|
|
|
--replace "install: install_target" "install: "
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2022-02-21 02:11:49 +01:00
|
|
|
passthru.updateScript = gitUpdater {
|
2020-05-26 23:15:24 +02:00
|
|
|
rev-prefix = "v";
|
|
|
|
};
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2020-05-26 22:31:42 +02:00
|
|
|
description = "Library to access GSettings from Qt";
|
|
|
|
homepage = "https://gitlab.com/ubports/core/gsettings-qt";
|
2018-03-05 02:57:22 +01:00
|
|
|
license = licenses.lgpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.romildo ];
|
|
|
|
};
|
|
|
|
}
|