about summary refs log tree commit diff
path: root/pkgs/development/libraries/accounts-qt/default.nix
blob: 8e5dd411fca28ffbdae3af674e7d19d5a7a532ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ stdenv, lib, fetchFromGitLab, gitUpdater, doxygen, glib, libaccounts-glib, pkg-config, qmake, qtbase, wrapQtAppsHook }:

stdenv.mkDerivation (finalAttrs: {
  pname = "accounts-qt";
  version = "1.17";

  # pinned to fork with Qt6 support
  src = fetchFromGitLab {
    owner = "accounts-sso";
    repo = "libaccounts-qt";
    rev = "refs/tags/VERSION_${finalAttrs.version}";
    hash = "sha256-mPZgD4r7vlUP6wklvZVknGqTXZBckSOtNzK7p6e2qSA=";
  };

  propagatedBuildInputs = [ glib libaccounts-glib ];
  buildInputs = [ qtbase ];
  nativeBuildInputs = [ doxygen pkg-config qmake wrapQtAppsHook ];

  # remove forbidden references to /build
  preFixup = ''
    patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$out"/bin/*
  '';

  passthru.updateScript = gitUpdater {
    rev = "VERSION_";
  };

  meta = with lib; {
    description = "Qt library for accessing the online accounts database";
    mainProgram = "accountstest";
    homepage = "https://gitlab.com/accounts-sso/libaccounts-qt";
    license = licenses.lgpl21;
    platforms = platforms.linux;
  };
})