about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/accounts-qml-module
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-12-07 14:04:47 +0100
committerAlyssa Ross <hi@alyssa.is>2023-12-07 14:04:47 +0100
commitba08e4e99b00a6916c4360de7288a7bfcef85328 (patch)
tree347c8b6ad50fcaafc08e50f1307a861378650440 /nixpkgs/pkgs/development/libraries/accounts-qml-module
parent190fd93d11701ad81af757be6260df9635bdb41a (diff)
parent2c7f3c0fb7c08a0814627611d9d7d45ab6d75335 (diff)
downloadnixlib-ba08e4e99b00a6916c4360de7288a7bfcef85328.tar
nixlib-ba08e4e99b00a6916c4360de7288a7bfcef85328.tar.gz
nixlib-ba08e4e99b00a6916c4360de7288a7bfcef85328.tar.bz2
nixlib-ba08e4e99b00a6916c4360de7288a7bfcef85328.tar.lz
nixlib-ba08e4e99b00a6916c4360de7288a7bfcef85328.tar.xz
nixlib-ba08e4e99b00a6916c4360de7288a7bfcef85328.tar.zst
nixlib-ba08e4e99b00a6916c4360de7288a7bfcef85328.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/accounts-qml-module')
-rw-r--r--nixpkgs/pkgs/development/libraries/accounts-qml-module/default.nix88
1 files changed, 88 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/accounts-qml-module/default.nix b/nixpkgs/pkgs/development/libraries/accounts-qml-module/default.nix
new file mode 100644
index 000000000000..aa68cb105af3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/accounts-qml-module/default.nix
@@ -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-28";
+
+  src = fetchFromGitLab {
+    owner = "accounts-sso";
+    repo = "accounts-qml-module";
+    rev = "05e79ebbbf3784a87f72b7be571070125c10dfe3";
+    hash = "sha256-ZpnkZauowLPBnO3DDDtG/x07XoQGVNqEF8AQB5TZK84=";
+  };
+
+  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;
+  };
+})