After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
result/bin/apply-formatting $NIXPKGS_PATH
78 lines
1.8 KiB
Nix
78 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitLab,
|
|
pkg-config,
|
|
qmake,
|
|
qtbase,
|
|
qtdeclarative,
|
|
wrapQtAppsHook,
|
|
glib,
|
|
gobject-introspection,
|
|
gitUpdater,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "gsettings-qt";
|
|
version = "0.2";
|
|
|
|
src = fetchFromGitLab {
|
|
group = "ubports";
|
|
owner = "core";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "14l8xphw4jd9ckqba13cyxq0i362x8lfsd0zlfawwi2z1q1vqm92";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
qmake
|
|
gobject-introspection
|
|
wrapQtAppsHook
|
|
];
|
|
|
|
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
|
|
'';
|
|
|
|
passthru.updateScript = gitUpdater {
|
|
rev-prefix = "v";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Library to access GSettings from Qt";
|
|
homepage = "https://gitlab.com/ubports/core/gsettings-qt";
|
|
license = licenses.lgpl3;
|
|
platforms = platforms.linux;
|
|
maintainers = [ maintainers.romildo ];
|
|
};
|
|
}
|