1{
2 stdenv,
3 lib,
4 fetchurl,
5 gi-docgen,
6 gobject-introspection,
7 meson,
8 ninja,
9 pkg-config,
10 uhttpmock_1_0,
11 libxml2,
12 glib,
13 gnome-online-accounts,
14 json-glib,
15 libsoup_3,
16 gnome,
17}:
18
19stdenv.mkDerivation (finalAttrs: {
20 pname = "libmsgraph";
21 version = "0.3.3";
22
23 outputs = [
24 "out"
25 "dev"
26 "devdoc"
27 ];
28
29 src = fetchurl {
30 url = "mirror://gnome/sources/msgraph/${lib.versions.majorMinor finalAttrs.version}/msgraph-${finalAttrs.version}.tar.xz";
31 hash = "sha256-N9fhLyqZBJCuohGE8LJ+C5Feu05QlvTWYyxiBRwFQBI=";
32 };
33
34 nativeBuildInputs = [
35 gi-docgen
36 gobject-introspection
37 meson
38 ninja
39 pkg-config
40 ];
41
42 buildInputs = [
43 uhttpmock_1_0
44 libxml2
45 ];
46
47 propagatedBuildInputs = [
48 glib
49 gnome-online-accounts
50 json-glib
51 libsoup_3
52 ];
53
54 postFixup = ''
55 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
56 moveToOutput "share/doc/msgraph-1" "$devdoc"
57 '';
58
59 passthru = {
60 updateScript = gnome.updateScript {
61 attrPath = "libmsgraph";
62 packageName = "msgraph";
63 };
64 };
65
66 meta = with lib; {
67 description = "Library to access MS Graph API for Office 365";
68 homepage = "https://gitlab.gnome.org/GNOME/msgraph";
69 changelog = "https://gitlab.gnome.org/GNOME/msgraph/-/blob/${finalAttrs.version}/NEWS?ref_type=tags";
70 license = licenses.lgpl3Plus;
71 teams = [ teams.gnome ];
72 platforms = platforms.linux;
73 };
74})