libsForQt5.accounts-qml-module: init at 0.7-unstable-2022-10-12

This commit is contained in:
OPNA2608 2023-12-02 18:40:53 +01:00
parent 48d38a834f
commit ee4d0c8b55
2 changed files with 90 additions and 0 deletions

View File

@ -0,0 +1,88 @@
{ stdenv
, lib
, fetchFromGitLab
, accounts-qt
, dbus-test-runner
, pkg-config
, qmake
, qtbase
, qtdeclarative
, signond
, xvfb-run
}:
stdenv.mkDerivation (finalAttrs: {
pname = "accounts-qml-module";
version = "0.7-unstable-2022-10-12";
src = fetchFromGitLab {
owner = "accounts-sso";
repo = "accounts-qml-module";
rev = "4119d52cb969b57fcab63f6bdf543e73c9c17092";
hash = "sha256-oixpmNJfmaPqQeAlPuKh+yj2PkXza0EHqF34Do3y4Fk=";
};
postPatch = ''
substituteInPlace src/src.pro \
--replace '$$[QT_INSTALL_BINS]/qmlplugindump' 'qmlplugindump' \
--replace '$$[QT_INSTALL_QML]' '${placeholder "out"}/${qtbase.qtQmlPrefix}'
# Don't install test binary
sed -i tests/tst_plugin.pro \
-e '/TARGET = tst_plugin/a INSTALLS -= target'
'' + lib.optionalString (!finalAttrs.doCheck) ''
sed -i accounts-qml-module.pro -e '/tests/d'
'';
# QMake can't find Qt modules in buildInputs
strictDeps = false;
nativeBuildInputs = [
pkg-config
qmake
qtdeclarative # qmlplugindump
];
buildInputs = [
accounts-qt
qtbase
qtdeclarative
signond
];
nativeCheckInputs = [
dbus-test-runner
xvfb-run
];
dontWrapQtApps = true;
qmakeFlags = [
# Needs qdoc, https://github.com/NixOS/nixpkgs/pull/245379
"CONFIG+=no_docs"
];
postConfigure = ''
make qmake_all
'';
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
preCheck = ''
# Needs xcb platform plugin
export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
'';
preInstall = ''
# Same plugin needed here, re-export in case checks are disabled
export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
'';
meta = with lib; {
description = "QML bindings for libaccounts-qt + libsignon-qt";
homepage = "https://gitlab.com/accounts-sso/accounts-qml-module";
license = licenses.lgpl21Only;
maintainers = with maintainers; [ OPNA2608 ];
platforms = platforms.linux;
};
})

View File

@ -80,6 +80,8 @@ in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdP
### LIBRARIES
accounts-qml-module = callPackage ../development/libraries/accounts-qml-module { };
accounts-qt = callPackage ../development/libraries/accounts-qt { };
alkimia = callPackage ../development/libraries/alkimia { };