aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/glib.scm
blob: f85d5e3225bbf965ee14a1f0d90cd080602cf00f (about) (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2021 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017 Petter <petter@mykolab.ch>
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2019, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Arthur Margerit <ruhtra.mar@gmail.com>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages glib)
  #:use-module (gnu packages)
  #:use-module (gnu packages backup)
  #:use-module (gnu packages base)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages bison)
  #:use-module (gnu packages boost)
  #:use-module (gnu packages check)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages docbook)
  #:use-module (gnu packages documentation)
  #:use-module (gnu packages elf)
  #:use-module (gnu packages enlightenment)
  #:use-module (gnu packages file)
  #:use-module (gnu packages flex)
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages gettext)
  #:use-module (gnu packages gnome)
  #:use-module (gnu packages graphviz)
  #:use-module (gnu packages gperf)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages libffi)
  #:use-module (gnu packages libunwind)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages m4)
  #:use-module (gnu packages nettle)
  #:use-module (gnu packages pcre)
  #:use-module (gnu packages package-management)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages perl-check)
  #:use-module (gnu packages popt)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages sqlite)
  #:use-module (gnu packages web)
  #:use-module (gnu packages xml)
  #:use-module (gnu packages xorg)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system cmake)
  #:use-module (guix build-system meson)
  #:use-module (guix build-system perl)
  #:use-module (guix build-system python)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (guix gexp)
  #:use-module (srfi srfi-26)
  #:use-module ((srfi srfi-1) #:hide (zip))

  ;; Export variables up-front to allow circular dependency with the 'xorg'
  ;; module.
  #:export (dbus
            glib
            gobject-introspection
            dbus-glib
            intltool
            itstool
            libsigc++
            glibmm
            telepathy-glib
            perl-net-dbus
            perl-net-dbus-glib))

(define dbus
  (package
    (name "dbus")
    (version "1.12.20")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "https://dbus.freedesktop.org/releases/dbus/dbus-"
                    version ".tar.gz"))
              (sha256
               (base32
                "1zp5gpx61v1cpqf2zwb1cidhp9xylvw49d3zydkxqk6b1qa20xpp"))
              (patches (search-patches "dbus-helper-search-path.patch"))))
    (build-system gnu-build-system)
    (arguments
     '(#:configure-flags
       (list
        ;; Install the system bus socket under /var.
        "--localstatedir=/var"

        ;; Install the session bus socket under /tmp.
        "--with-session-socket-dir=/tmp"

        ;; Build shared libraries only.
        "--disable-static"

        ;; Use /etc/dbus-1 for system-wide config.
        ;; Look for configuration file under
        ;; /etc/dbus-1.  This is notably required by
        ;; 'dbus-daemon-launch-helper', which looks for
        ;; the 'system.conf' file in that place,
        ;; regardless of what '--config-file' was
        ;; passed to 'dbus-daemon' on the command line;
        ;; see <https://bugs.freedesktop.org/show_bug.cgi?id=92458>.
        "--sysconfdir=/etc")
       #:phases
       (modify-phases %standard-phases
         (replace 'install
                  (lambda _
                    ;; Don't try to create /var and /etc.
                    (invoke "make"
                            "localstatedir=/tmp/dummy"
                            "sysconfdir=/tmp/dummy"
                            "install"))))))
    (native-inputs
     (list pkg-config
           ;; Dependencies to generate the doc.
           docbook-xml-4.4
           docbook-xsl
           doxygen
           xmlto
           libxml2 ;for XML_CATALOG_FILES
           libxslt
           yelp-tools))
    (inputs
     (list expat
           ;; Add a dependency on libx11 so that 'dbus-launch' has support for
           ;; '--autolaunch'.
           libx11))
    (outputs '("out" "doc"))            ;22 MiB of HTML doc
    (home-page "https://www.freedesktop.org/wiki/Software/dbus/")
    (synopsis "Message bus for inter-process communication (IPC)")
    (description
     "D-Bus is a message bus system, a simple way for applications to
talk to one another.  In addition to interprocess communication, D-Bus
helps coordinate process lifecycle; it makes it simple and reliable to
code a \"single instance\" application or daemon, and to launch
applications and daemons on demand when their services are needed.

D-Bus supplies both a system daemon (for events such as \"new hardware
device added\" or \"printer queue changed\") and a
per-user-login-session daemon (for general IPC needs among user
applications).  Also, the message bus is built on top of a general
one-to-one message passing framework, which can be used by any two apps
to communicate directly (without going through the message bus
daemon).  Currently the communicating applications are on one computer,
or through unencrypted TCP/IP suitable for use behind a firewall with
shared NFS home directories.")
    (license license:gpl2+)))                     ; or Academic Free License 2.1

;;; This variant is used for the Jami service: it provides an entry point to
;;; further customize the configuration of the D-Bus instance run by the
;;; jami-dbus-session service.
(define-public dbus-for-jami
  (hidden-package
   (package/inherit dbus
     (name "dbus-for-jami")
     (arguments
      (substitute-keyword-arguments (package-arguments dbus)
        ((#:phases phases)
         `(modify-phases ,phases
            (add-after 'unpack 'customize-config
              (lambda _
                (substitute* "bus/session.conf.in"
                  (("@SYSCONFDIR_FROM_PKGDATADIR@/dbus-1/session-local.conf")
                   "/var/run/jami/session-local.conf")))))))))))

;;; The reason this is not enabled in the regular dbus package is because it
;;; impacts the performance of D-Bus (including its library) as a whole, even
;;; when the DBUS_VERBOSE environment variable is not set.
(define-public dbus-verbose
  (package/inherit dbus
    (name "dbus-verbose")
    (arguments (substitute-keyword-arguments (package-arguments dbus)
                 ((#:configure-flags flags '())
                  `(cons "--enable-verbose-mode" ,flags))))
    (synopsis "D-Bus with verbose mode enabled for debugging")
    (description "This variant D-Bus package is built with verbose mode, which
eases debugging of D-Bus services by printing various debug information when
the @code{DBUS_VERBOSE} environment variable is set to @samp{1}.  For more
information, refer to the @samp{dbus-daemon(1)} man page.")))

(define glib
  (package
    (name "glib")
    (version "2.70.2")
    (source
     (origin
       (method url-fetch)
       (uri
        (string-append "mirror://gnome/sources/"
                       name "/" (string-take version 4) "/"
                       name "-" version ".tar.xz"))
       (sha256
        (base32 "0vw08p4jllavp9qmlqg1yl1zanmy53yid46wipas6gfdhnf4al85"))
       (patches
        (search-patches "glib-appinfo-watch.patch"
                        "glib-skip-failing-test.patch"))
       (modules '((guix build utils)))
       (snippet
        '(begin
           (substitute* "tests/spawn-test.c"
             (("/bin/sh") "sh"))))))
    (build-system meson-build-system)
    (outputs '("out"                    ;libraries, locales, etc
               "static"                 ;static libraries
               "bin"                    ;executables; depends on Python
               "debug"))
    (arguments
     `(#:disallowed-references
       (,tzdata-for-tests
        ;; Verify glib-mkenums, gtester, ... use the cross-compiled
        ;; python.
        ,@(if (%current-target-system)
              (map (cut gexp-input <> #:native? #t)
                   `(,(this-package-native-input "python")
                     ,(this-package-native-input "python-wrapper")))
              '()))
       #:configure-flags ,#~(list "--default-library=both"
                                  "-Dman=false"
                                  "-Dselinux=disabled"
                                  (string-append "--bindir="
                                                 #$output:bin "/bin"))
       #:phases
       (modify-phases %standard-phases
         ;; Needed to pass the test phase on slower ARM and i686 machines.
         (add-after 'unpack 'increase-test-timeout
           (lambda _
             (substitute* "meson.build"
               (("(test_timeout.*) = ([[:digit:]]+)" all first second)
                (string-append first " = " second "0")))))
         (add-after 'unpack 'disable-failing-tests
           (lambda _
             (substitute* "gio/tests/meson.build"
               ((".*'testfilemonitor'.*") ;marked as flaky
                ""))
             (with-directory-excursion "glib/tests"
               (substitute* '("unix.c" "utils.c")
                 (("[ \t]*g_test_add_func.*;") "")))
             (with-directory-excursion "gio/tests"
               (substitute* '("contenttype.c" "gdbus-address-get-session.c"
                              "gdbus-peer.c" "appinfo.c" "desktop-app-info.c")
                 (("[ \t]*g_test_add_func.*;") "")))

             ,@(if (target-x86-32?)
                   ;; Comment out parts of timer.c that fail on i686 due to
                   ;; excess precision when building with GCC 10:
                   ;; <https://gitlab.gnome.org/GNOME/glib/-/issues/820>.
                   '((substitute* "glib/tests/timer.c"
                       (("^  g_assert_cmpuint \\(micros.*" all)
                        (string-append "//" all "\n"))
                       (("^  g_assert_cmpfloat \\(elapsed, ==.*" all)
                        (string-append "//" all "\n"))))
                   '())))
         ;; Python references are not being patched in patch-phase of build,
         ;; despite using python-wrapper as input. So we patch them manually.
         ;;
         ;; These python scripts are both used during build and installed,
         ;; so at first, use a python from 'native-inputs', not 'inputs'. When
         ;; cross-compiling, the 'patch-shebangs' phase will replace
         ;; the native python with a python from 'inputs'.
         (add-after 'unpack 'patch-python-references
           (lambda* (#:key native-inputs inputs #:allow-other-keys)
             (substitute* '("gio/gdbus-2.0/codegen/gdbus-codegen.in"
                            "glib/gtester-report.in"
                            "gobject/glib-genmarshal.in"
                            "gobject/glib-mkenums.in")
               (("@PYTHON@")
                (search-input-file (or native-inputs inputs)
                                   (string-append
                                    "/bin/python"
                                    ,(version-major+minor
                                      (package-version python))))))))
         (add-before 'check 'pre-check
           (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
             ;; For tests/gdatetime.c.
             (setenv "TZDIR"
                     (search-input-directory (or native-inputs inputs)
                                             "share/zoneinfo"))
             ;; Some tests want write access there.
             (setenv "HOME" (getcwd))
             (setenv "XDG_CACHE_HOME" (getcwd))))
         (add-after 'install 'move-static-libraries
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out"))
                   (static (assoc-ref outputs "static")))
               (mkdir-p (string-append static "/lib"))
               (for-each (lambda (a)
                           (rename-file a (string-append static "/lib/"
                                                         (basename a))))
                         (find-files out "\\.a$")))))
         (add-after 'install 'patch-pkg-config-files
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out")))
               ;; Do not refer to "bindir", which points to "${prefix}/bin".
               ;; We don't patch "bindir" to point to "$bin/bin", because that
               ;; would create a reference cycle between the "out" and "bin"
               ;; outputs.
               (substitute*
                   (list
                    (string-append out "/lib/pkgconfig/gio-2.0.pc")
                    (string-append out "/lib/pkgconfig/glib-2.0.pc"))
                 (("^bindir=.*")
                  "")
                 (("=\\$\\{bindir\\}/")
                  "="))))))))
    (native-inputs
     `(("gettext" ,gettext-minimal)
       ("m4" ,m4)                       ; for installing m4 macros
       ("perl" ,perl)                   ; needed by GIO tests
       ("pkg-config" ,pkg-config)
       ("python" ,python)               ; For 'patch-python-references
       ("python-wrapper" ,python-wrapper)
       ("tzdata" ,tzdata-for-tests)))   ; for tests/gdatetime.c
    (inputs
     (list bash-completion
           ;; "python", "python-wrapper" and "bash-minimal"
           ;; are for the 'patch-shebangs' phase, to make
           ;; sure the installed scripts end up with a correct shebang
           ;; when cross-compiling.
           python
           python-wrapper
           bash-minimal
           dbus
           libelf))
    (propagated-inputs
     (list libffi ; in the Requires.private field of gobject-2.0.pc
           pcre ; in the Requires.private field of glib-2.0.pc
           `(,util-linux "lib") ;for libmount
           zlib))         ; in the Requires.private field of glib-2.0.pc
    (native-search-paths
     ;; This variable is not really "owned" by GLib, but several related
     ;; packages refer to it: gobject-introspection's tools use it as a search
     ;; path for .gir files, and it's also a search path for schemas produced
     ;; by 'glib-compile-schemas'.
     (list
      (search-path-specification
       (variable "XDG_DATA_DIRS")
       (files '("share")))
      ;; To load extra gio modules from glib-networking, etc.
      (search-path-specification
       (variable "GIO_EXTRA_MODULES")
       (files '("lib/gio/modules")))))
    (search-paths native-search-paths)
    (synopsis "Low-level core library for GNOME projects")
    (description "GLib provides the core application building blocks for
libraries and applications written in C.  It provides the core object system
used in GNOME, the main loop implementation, and a large set of utility
functions for strings and common data structures.")
    (home-page "https://wiki.gnome.org/Projects/GLib")
    (license license:lgpl2.1+)
    (properties '((hidden? . #t)))))

(define-public glib-next
  (package
    (inherit glib)
    (name "glib")
    (version "2.73.3")
    (source
     (origin
       (inherit (package-source glib))
       (uri
        (string-append "mirror://gnome/sources/"
                       name "/" (string-take version 4) "/"
                       name "-" version ".tar.xz"))
       (snippet
        '(substitute* "glib/tests/spawn-test.c"
           (("/bin/sh") "sh")))
       (sha256
        (base32 "1bgfch7zj1pq4rkqcibfky1470ijljyrx5pn5s5v9mk72s22n6nz"))))
    (arguments
     (substitute-keyword-arguments (package-arguments glib)
       ((#:test-options test-options ''())
        ;; Skip flaky or slow tests.
        `(cons* "--no-suite=slow" "--no-suite=flaky" ,test-options))
       ((#:phases phases '%standard-phases)
        `(modify-phases ,phases
           (replace 'disable-failing-tests
             (lambda _
               (with-directory-excursion "glib/tests"
                 (substitute* '("unix.c" "utils.c")
                   (("[ \t]*g_test_add_func.*;") "")))
               ;; The "glib:gio / file" test fails with the error "No
               ;; application is registered as handling this file" (see:
               ;; https://gitlab.gnome.org/GNOME/glib/-/issues/2742).
               (with-directory-excursion "gio/tests"
                 (substitute* '("appinfo.c"
                                "contenttype.c"
                                "desktop-app-info.c"
                                "file.c"
                                "gdbus-address-get-session.c"
                                "gdbus-peer.c")
                   (("[ \t]*g_test_add_func.*;") "")))

               ,@(if (target-x86-32?)
                     ;; Comment out parts of timer.c that fail on i686 due to
                     ;; excess precision when building with GCC 10:
                     ;; <https://gitlab.gnome.org/GNOME/glib/-/issues/820>.
                     '((substitute* "glib/tests/timer.c"
                         (("^  g_assert_cmpuint \\(micros.*" all)
                          (string-append "//" all "\n"))
                         (("^  g_assert_cmpfloat \\(elapsed, ==.*" all)
                          (string-append "//" all "\n"))))
                     '())))))))
    (native-inputs
     (modify-inputs (package-native-inputs glib)
       (append desktop-file-utils)))
    (propagated-inputs
     (modify-inputs (package-propagated-inputs glib)
       (replace "pcre" pcre2)))))

(define-public glib-with-documentation
  ;; glib's doc must be built in a separate package since it requires gtk-doc,
  ;; which in turn depends on glib.
  (let ((base glib-next))
    (package/inherit base
      (properties (alist-delete 'hidden? (package-properties base)))
      (outputs (cons "doc" (package-outputs base))) ; 20 MiB of GTK-Doc reference
      (native-inputs
       `(("docbook-xml-4.2" ,docbook-xml-4.2)
         ("docbook-xml-4.5" ,docbook-xml)
         ("docbook-xsl" ,docbook-xsl)
         ("gtk-doc" ,gtk-doc)
         ("libxml2" ,libxml2)
         ("xsltproc" ,libxslt)
         ,@(package-native-inputs base)))
      (arguments
       (substitute-keyword-arguments (package-arguments base)
         ((#:configure-flags flags ''())
          #~(cons "-Dgtk_doc=true"
                  (delete "-Dman=false" #$flags)))
         ((#:phases phases)
          `(modify-phases ,phases
             (add-after 'unpack 'patch-docbook-xml
               (lambda* (#:key inputs #:allow-other-keys)
                 (with-directory-excursion "docs"
                   (substitute* (find-files "." "\\.xml$")
                     (("http://www.oasis-open.org/docbook/xml/4\\.5/")
                      (string-append (assoc-ref inputs "docbook-xml-4.5")
                                     "/xml/dtd/docbook/"))
                     (("http://www.oasis-open.org/docbook/xml/4\\.2/")
                      (string-append (assoc-ref inputs "docbook-xml-4.2")
                                     "/xml/dtd/docbook/"))))))
             (add-after 'install 'move-doc
               (lambda* (#:key outputs #:allow-other-keys)
                 (let* ((out (assoc-ref outputs "out"))
                        (doc (assoc-ref outputs "doc"))
                        (html (string-append "/share/gtk-doc")))
                   (mkdir-p (string-append doc "/share"))
                   (rename-file
                    (string-append out html)
                    (string-append doc html))))))))))))

(define (python-extension-suffix python triplet)
  "Determine the suffix for C extensions for PYTHON when compiled
for TRIPLET."
  ;; python uses strings like 'x86_64-linux-gnu' instead of
  ;; 'x86_64-unknown-linux-gnu'.
  (define normalised-system
    (string-replace-substring triplet "-unknown-" "-"))
  (define major.minor (version-major+minor (package-version python)))
  (define majorminor (string-delete #\. major.minor))
  (string-append
    ;; If guix' python package used "--with-pydebug", a #\d would
    ;; need to be added, likewise "--with-pymalloc" and "--with-wide-unicode"
    ;; would require a #\m and #\u, see cpython's configure.ac.
    ".cpython-" majorminor "-" normalised-system
    (if (target-mingw? triplet)
        ".dll"
        ".so")))

(define (correct-library-name-phase python name)
  "Return a G-exp evaluating to a phase renaming the python extension NAME
from what Meson thinks its name should be to what python expects its name
to be.  NAME must not include the platform-specific suffix.  This can only
be used when cross-compiling."
  #~(lambda _
      (define name #$name)
      (define native-suffix
        #$(python-extension-suffix python
                                   (nix-system->gnu-triplet (%current-system))))
      (define target-suffix
        #$(python-extension-suffix python (%current-target-system)))
      (define native-name
        (string-append name native-suffix))
      (define target-name
        (string-append name target-suffix))
      (rename-file native-name target-name)))

(define gobject-introspection
  (package
    (name "gobject-introspection")
    (version "1.66.1")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/"
                   "gobject-introspection/" (version-major+minor version)
                   "/gobject-introspection-" version ".tar.xz"))
             (sha256
              (base32 "078n0q7b6z682mf4irclrksm73cyixq295mqnqifl9plwmgaai6x"))
             (patches (search-patches
                       "gobject-introspection-cc.patch"
                       "gobject-introspection-girepository.patch"
                       "gobject-introspection-absolute-shlib-path.patch"))))
    (build-system meson-build-system)
    (arguments
     `(,@(if (%current-target-system)
             `(#:configure-flags
               '("-Dgi_cross_use_prebuilt_gi=true"
                 ;; Building introspection data requires running binaries
                 ;; for ‘host’ on ‘build’, so don't do that.
                 ;;
                 ;; TODO: it would be nice to have introspection data anyways
                 ;; as discussed here: https://issues.guix.gnu.org/50201#60.
                 "-Dbuild_introspection_data=false"))
             '())
       #:phases
       ,#~
       (modify-phases %standard-phases
         #$@(if (%current-target-system)
                ;; 'typelibs' is undefined.
                `((add-after 'unpack 'set-typelibs
                    (lambda _
                      (substitute* "meson.build"
                        (("\\bsources: typelibs\\b")
                         "sources: []")))))
                '())
         (add-after 'unpack 'do-not-use-/usr/bin/env
           (lambda _
             (substitute* "tools/g-ir-tool-template.in"
               (("#!@PYTHON_CMD@")
                (string-append "#!" (which "python3"))))))
         #$@(if (%current-target-system)
               ;; Meson gives python extensions an incorrect name, see
               ;; <https://github.com/mesonbuild/meson/issues/7049>.
                #~((add-after 'install 'rename-library
                     #$(correct-library-name-phase
                         (this-package-input "python")
                         #~(string-append #$output
                                          "/lib/gobject-introspection/giscanner"
                                          "/_giscanner"))))
                #~()))))
    (native-inputs
     `(("glib" ,glib "bin")
       ("pkg-config" ,pkg-config)
       ("bison" ,bison)
       ("flex" ,flex)))
    (inputs
     `(,@(if (%current-target-system)
             `(("python" ,python))
             `(("bison" ,bison)
               ("flex" ,flex)
               ("python" ,python-wrapper)))
       ("zlib" ,zlib)))
    (propagated-inputs
     (list glib
           ;; In practice, GIR users will need libffi when using
           ;; gobject-introspection.
           libffi))
    (native-search-paths
     (list
      (search-path-specification
       (variable "GI_TYPELIB_PATH")
       (files '("lib/girepository-1.0")))))
    (search-paths native-search-paths)
    (synopsis "GObject introspection tools and libraries")
    (description "GObject introspection is a middleware layer between
C libraries (using GObject) and language bindings.  The C library can be scanned
at compile time and generate metadata files, in addition to the actual native
C library.  Then language bindings can read this metadata and automatically
provide bindings to call into the C library.")
    (home-page "https://wiki.gnome.org/Projects/GObjectIntrospection")
    (license
     (list
      ;; For library.
      license:lgpl2.0+
      ;; For tools.
      license:gpl2+))))

(define-public gobject-introspection-next
  (package
    (inherit gobject-introspection)
    (name "gobject-introspection")
    (version "1.73.1")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnome/sources/"
                                  "gobject-introspection/" (version-major+minor version)
                                  "/gobject-introspection-" version ".tar.xz"))
              (sha256
               (base32 "1gkbx32as3v2286w7k3j24fwhkxj6brr49881m2zavxamfwxdm34"))
              (patches (search-patches
                        "gobject-introspection-cc-1.72.patch"
                        "gobject-introspection-girepository.patch"
                        "gobject-introspection-absolute-shlib-path-1.72.patch"))))
    (propagated-inputs
     (modify-inputs (package-propagated-inputs gobject-introspection)
       (replace "glib" glib-next)))))

(define intltool
  (package
    (name "intltool")
    (version "0.51.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "https://launchpad.net/intltool/trunk/"
                                 version "/+download/intltool-"
                                 version ".tar.gz"))
             (patches (search-patches "intltool-perl-compatibility.patch"))
             (sha256
              (base32
               "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"))))
    (build-system gnu-build-system)
    (inputs
     (list file))
    (propagated-inputs
     `(;; Propagate gettext because users expect it to be there, and so does
       ;; the `intltool-update' script.
       ("gettext" ,gettext-minimal)

       ("perl-xml-parser" ,perl-xml-parser)
       ("perl" ,perl)))
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch-file-references
           (lambda* (#:key inputs #:allow-other-keys)
             (let ((file (assoc-ref inputs "file")))
               (substitute* "intltool-update.in"
                 (("`file") (string-append "`" file "/bin/file")))
               #t))))))
    (home-page "https://launchpad.net/intltool/+download")
    (synopsis "Tools to centralise translations of different file formats")
    (description
     "Intltool is a set of tools to centralise translations of many different
file formats using GNU gettext-compatible PO files.

The intltool collection can be used to do these things:

    Extract translatable strings from various source files (.xml.in,
    glade, .desktop.in, .server.in, .oaf.in).

    Collect the extracted strings together with messages from traditional
    source files (.c, .h) in po/$(PACKAGE).pot.

    Merge back the translations from .po files into .xml, .desktop and
    oaf files.  This merge step will happen at build resp. installation time.")
    (license license:gpl2+)))

(define itstool
  (package
    (name "itstool")
    (version "2.0.6")
    (source (origin
             (method url-fetch)
             (uri (string-append "http://files.itstool.org/itstool/itstool-"
                                 version ".tar.bz2"))
             (sha256
              (base32
               "1acjgf8zlyk7qckdk19iqaca4jcmywd7vxjbcs1mm6kaf8icqcv2"))))
    (build-system gnu-build-system)
    (inputs
     (list libxml2 python-libxml2 python))
    (arguments
     '(#:phases
       (modify-phases %standard-phases
         (add-after 'install 'wrap-program
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((prog (string-append (assoc-ref outputs "out")
                                        "/bin/itstool")))
               (wrap-program prog
                 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH"))))
               #t))))))
    (home-page "https://itstool.org")
    (synopsis "Tool to translate XML documents with PO files")
    (description
     "ITS Tool allows you to translate your XML documents with PO files, using
rules from the W3C Internationalization Tag Set (ITS) to determine what to
translate and how to separate it into PO file messages.

PO files are the standard translation format for GNU and other Unix-like
systems.  They present translatable information as discrete messages, allowing
each message to be translated independently.  In contrast to whole-page
translation, translating with a message-based format like PO means you can
easily track changes to the source document down to the paragraph.  When new
strings are added or existing strings are modified, you only need to update the
corresponding messages.

ITS Tool is designed to make XML documents translatable through PO files by
applying standard ITS rules, as well as extension rules specific to ITS Tool.
ITS also provides an industry standard way for authors to override translation
information in their documents, such as whether a particular element should be
translated.")
    (license license:gpl3+)))

(define dbus-glib
  (package
    (name "dbus-glib")
    (version "0.110")
    (source (origin
             (method url-fetch)
             (uri
              (string-append "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-"
                             version ".tar.gz"))
             (sha256
              (base32
               "09g8swvc95bk1z6j8sw463p2v0dqmgm2zjfndf7i8sbcyq67dr3w"))))
    (build-system gnu-build-system)
    (arguments
     (if (%current-target-system)
         `(#:configure-flags
           ;; Run a native 'dbus-binding-tool' instead of a cross-compiled
           ;; 'dbus-binding-tool' when cross-compiling.
           ,#~(list
               (string-append
                "--with-dbus-binding-tool="
                #+(file-append this-package "/bin/dbus-binding-tool"))))
         '()))
    (propagated-inputs ; according to dbus-glib-1.pc
     (list dbus glib))
    (inputs
     (list expat))
    (native-inputs
     (list `(,glib "bin") pkg-config))
    (home-page "https://dbus.freedesktop.org/doc/dbus-glib/")
    (synopsis "D-Bus GLib bindings")
    (description
     "GLib bindings for D-Bus.  The package is obsolete and superseded
by GDBus included in Glib.")
    (license license:gpl2)))                     ; or Academic Free License 2.1

(define-public libaccounts-glib
  (package
    (name "libaccounts-glib")
    (version "1.25")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://gitlab.com/accounts-sso/libaccounts-glib")
                    (commit (string-append "VERSION_" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "19rhk9f97m736d5ia26vfcbjp5kgi454558yhf9mrwm4iw5d9pk4"))))
    (build-system meson-build-system)
    (native-inputs (list dbus
                         `(,glib "bin")
                         gobject-introspection
                         gtk-doc
                         pkg-config
                         vala))
    (inputs (list check python python-pygobject))
    (propagated-inputs (list glib libxml2 sqlite))
    (arguments
     (list #:tests? #f                  ;one test fails.
           #:imported-modules `((guix build python-build-system)
                                ,@%meson-build-system-modules)
           #:modules '(((guix build python-build-system)
                        #:select (python-version))
                       (guix build meson-build-system)
                       (guix build utils))
           ;; don't try installing to python store path.
           #:configure-flags
           #~(list (string-append "-Dpy-overrides-dir="
                                  #$output "/lib/python"
                                  (python-version #$(this-package-input
                                                     "python"))
                                  "/site-packages/gi/overrides"))
           #:phases #~(modify-phases %standard-phases
                        (replace 'check
                          (lambda* (#:key tests? #:allow-other-keys)
                            (when tests?
                              (invoke "dbus-run-session" "--" "meson" "test"
                                      "--print-errorlogs")))))))
    (home-page "https://accounts-sso.gitlab.io/")
    (synopsis "Accounts SSO (Single Sign-On) management library for GLib
applications")
    (description
     "Accounts SSO is a framework for application developers who
wish to acquire, use and store web account details and credentials.  It
handles the authentication process of an account and securely stores the
credentials and service-specific settings.")
    (license license:lgpl2.1+)))

(define libsigc++
  (package
    (name "libsigc++")
    (version "3.0.6")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnome/sources/libsigc++/"
                                  (version-major+minor version) "/"
                                  name "-" version ".tar.xz"))
              (sha256
               (base32
                "1kn57b039lg20182lnchl1ys27vf34brn43f895cal8nc7sdq3mp"))))
    (build-system meson-build-system)
    (outputs '("out" "doc"))
    (arguments
     `(#:configure-flags
       (list
        "-Dbuild-documentation=true")
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch-docbook-xml
           (lambda* (#:key inputs #:allow-other-keys)
             (with-directory-excursion "docs"
               (substitute* (find-files "." "\\.xml$")
                 (("http://www.oasis-open.org/docbook/xml/4\\.1\\.2/")
                  (string-append (assoc-ref inputs "docbook-xml")
                                 "/xml/dtd/docbook/"))))
             #t))
         (add-after 'install 'move-doc
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (doc (assoc-ref outputs "doc")))
               (mkdir-p (string-append doc "/share"))
               (rename-file
                (string-append out "/share/doc")
                (string-append doc "/share/doc"))
               #t))))))
    (native-inputs
     `(("docbook-xml" ,docbook-xml-4.1.2)
       ("docbook-xsl" ,docbook-xsl)
       ("dot" ,graphviz)
       ("doxygen" ,doxygen)
       ("m4" ,m4)
       ("mm-common" ,mm-common)
       ("perl" ,perl)
       ("pkg-config" ,pkg-config)
       ("xmllint" ,libxml2)
       ("xsltproc" ,libxslt)))
    (inputs
     (list boost))
    (home-page "https://libsigcplusplus.github.io/libsigcplusplus/")
    (synopsis "Type-safe callback system for standard C++")
    (description
     "Libsigc++ implements a type-safe callback system for standard C++.  It
     allows you to define signals and to connect those signals to any callback
     function, either global or a member function, regardless of whether it is
     static or virtual.

     It also contains adaptor classes for connection of dissimilar callbacks and
     has an ease of use unmatched by other C++ callback libraries.")
    (license license:lgpl3+)))

 (define-public libsigc++-2
   (package
    (inherit libsigc++)
    (name "libsigc++")
    (version "2.9.3")
    (source
     (origin
       (method url-fetch)
       (uri
        (string-append "mirror://gnome/sources/libsigc++/"
                       (version-major+minor version)
                       "/libsigc++-" version ".tar.xz"))
       (sha256
        (base32 "0zq963d0sss82q62fdfjs7l9iwbdch51albck18cb631ml0v7y8b"))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch-docbook-xml
           (lambda* (#:key inputs #:allow-other-keys)
             (with-directory-excursion "docs"
               (substitute* (find-files "." "\\.xml$")
                 (("http://www.oasis-open.org/docbook/xml/4\\.1\\.2/")
                  (string-append (assoc-ref inputs "docbook-xml")
                                 "/xml/dtd/docbook/"))))
             #t))
         (add-after 'install 'move-doc
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (doc (assoc-ref outputs "doc")))
               (mkdir-p (string-append doc "/share"))
               (rename-file
                (string-append out "/share/doc")
                (string-append doc "/share/doc"))
               #t))))))))

(define glibmm
  (package
    (name "glibmm")
    (version "2.70.0")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnome/sources/glibmm/"
                                  (version-major+minor version)
                                  "/glibmm-" version ".tar.xz"))
              (sha256
               (base32
                "085mzpphz71sh5wh71ppikwnxsgn4pk3s4bzz6ingj6wxn5gs240"))))
    (build-system meson-build-system)
    (outputs '("out" "doc"))
    (arguments
     `(#:configure-flags
       (list "-Dbuild-documentation=true")
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'disable-failing-tests
           (lambda _
             (substitute* "tests/meson.build"
               ;; This test uses /etc/fstab as an example file to read
               ;; from; disable it.
               (("[ \t]*.*giomm_simple.*$") "")
               ;; This test does a DNS lookup, and then expects to be able
               ;; to open a TLS session; just skip it.
               (("[ \t]*.*giomm_tls_client.*$") ""))))
         (add-after 'install 'move-doc
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (doc (assoc-ref outputs "doc")))
               (mkdir-p (string-append doc "/share"))
               (rename-file
                (string-append out "/share/doc")
                (string-append doc "/share/doc"))))))))
    (native-inputs
     (list graphviz
           doxygen
           `(,glib "bin")
           m4
           mm-common
           perl
           pkg-config
           libxslt))
    (propagated-inputs
     (list libsigc++ glib))
    (home-page "https://gtkmm.org/")
    (synopsis "C++ interface to the GLib library")
    (description
     "Glibmm provides a C++ programming interface to the part of GLib that are
useful for C++.")
    (license license:lgpl2.1+)))

 (define-public glibmm-2.64
   (package
    (inherit glibmm)
    (name "glibmm")
    (version "2.64.5")
    (source
     (origin
       (method url-fetch)
       (uri
        (string-append "mirror://gnome/sources/glibmm/"
                       (version-major+minor version)
                       "/glibmm-" version ".tar.xz"))
       (sha256
        (base32 "11m37sbx0i18cl17d0fkq0bik4bbzlb5n8kcl651jhci5ipci3sh"))))
     (propagated-inputs
      (modify-inputs (package-propagated-inputs glibmm)
        (replace "libsigc++" libsigc++-2)))))

(define-public python-pygobject
  (package
    (name "python-pygobject")
    (version "3.40.1")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://gnome/sources/pygobject/"
                           (version-major+minor version)
                           "/pygobject-" version ".tar.xz"))
       (sha256
        (base32
         "0d80g5kgf2i9cginyhalvb7ibfk9g30yilqzmcsw6h6byj8xbih0"))
       (modules '((guix build utils)))
       (snippet
        '(begin
           ;; We disable these tests in a snippet so that they are inherited
           ;; by the Python 2 variant which is built differently.
           (with-directory-excursion "tests"
             ;; FIXME: These tests require Gdk and/or Gtk 4.
             (for-each delete-file
                       '("test_atoms.py" "test_overrides_gtk.py"))
             #t)))))
    (build-system meson-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (replace 'check
           (lambda* (#:key tests? #:allow-other-keys)
             (when tests?
               ;; The default 90 seconds can be too low on slower machines.
               (invoke "meson" "test" "--timeout-multiplier" "5")))))))
    (native-inputs
     `(("glib-bin" ,glib "bin")
       ("pkg-config" ,pkg-config)
       ("python-pytest" ,python-pytest)
       ("python-wrapper" ,python-wrapper))) ; For patching shebangs
    (inputs
     (list python python-pycairo gobject-introspection))
    (propagated-inputs
     ;; pygobject-3.0.pc refers to all these.
     (list glib libffi))
    ;; For finding typelib files, since gobject-introscpetion isn't propagated.
    (native-search-paths (package-native-search-paths gobject-introspection))
    (home-page "https://live.gnome.org/PyGObject")
    (synopsis "Python bindings for GObject")
    (description
     "Python bindings for GLib, GObject, and GIO.")
    (license license:lgpl2.1+)))

(define-public perl-glib
  (package
    (name "perl-glib")
    (version "1.3292")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "mirror://cpan/authors/id/X/XA/XAOC/Glib-"
                    version ".tar.gz"))
              (sha256
               (base32
                "1q5075d6v2g5sm675hyzrcpxsrh09z83crfci8b0wl3jwmnz0frg"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-extutils-depends perl-extutils-pkgconfig))
    (propagated-inputs
     (list glib))
    (home-page "https://metacpan.org/release/Glib")
    (synopsis "Perl wrappers for the GLib utility and Object libraries")
    (description "This module provides perl access to GLib and GLib's GObject
libraries.  GLib is a portability and utility library; GObject provides a
generic type system with inheritance and a powerful signal system.  Together
these libraries are used as the foundation for many of the libraries that make
up the Gnome environment, and are used in many unrelated projects.")
    (license license:lgpl2.1+)))

(define-public perl-glib-object-introspection
  (package
    (name "perl-glib-object-introspection")
    (version "0.049")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/"
                           "Glib-Object-Introspection-" version ".tar.gz"))
       (sha256
        (base32 "0mxg6pz8qfyipw0ypr54alij0c4adzg94f62702b2a6hkp5jhij6"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-extutils-depends perl-extutils-pkgconfig))
    (propagated-inputs
     (list gobject-introspection perl-cairo-gobject perl-glib))
    (home-page "https://metacpan.org/dist/Glib-Object-Introspection")
    (synopsis "Dynamically create Perl language bindings")
    (description "Glib::Object::Introspection uses the gobject-introspection and
libffi projects to dynamically create Perl bindings for a wide variety of
libraries.  Examples include gtk+, webkit, libsoup and many more.")
    (license license:lgpl2.1+)))

(define telepathy-glib
  (package
    (name "telepathy-glib")
    (version "0.24.2")
    (source
     (origin
      (method url-fetch)
       (uri
        (string-append
         "https://telepathy.freedesktop.org/releases/telepathy-glib/"
         "telepathy-glib-" version ".tar.gz"))
       (sha256
        (base32
         "1w3kja8j3gz2apal79bi3hq44xk5g78aphrqbw983l6df7bp98xh"))))
    (build-system gnu-build-system)
    (arguments
     '(#:configure-flags '("--enable-vala-bindings")

       ;; '../tools/glib-*.py' generate files but the target dependencies are
       ;; (presumably) not fully specified in the makefile, leading to
       ;; parallel build errors like:
       ;;
       ;;   EOFError: EOF read where object expected
       ;;   make[2]: *** [Makefile:1906: _gen/register-dbus-glib-marshallers-body.h] Error 1
       #:parallel-build? #f
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'disable-failing-tests
           (lambda _
             ;; None of the tests below are able to find the org.gtk.vfs.Daemon
             ;; service file provided by gvfs.
             (substitute* "tests/dbus/Makefile.in"
               (("test-contacts\\$\\(EXEEXT\\)") "")
               (("test-file-transfer-channel\\$\\(EXEEXT\\)") "")
               (("test-stream-tube\\$\\(EXEEXT\\)") ""))
             #t)))))
    (native-inputs
     `(("glib" ,glib "bin") ; uses glib-mkenums
       ("gobject-introspection" ,gobject-introspection)
       ("pkg-config" ,pkg-config)
       ("python" ,python-2)
       ("vala" ,vala)
       ("xsltproc" ,libxslt)))
    (propagated-inputs
     ;; There are all in the Requires.private field of telepathy-glib.pc.
     (list dbus dbus-glib glib))
    (home-page "https://telepathy.freedesktop.org/wiki/")
    (synopsis "GLib Real-time communications framework over D-Bus")
    (description "Telepathy is a flexible, modular communications framework
that enables real-time communication over D-Bus via pluggable protocol
backends.  Telepathy is a communications service that can be accessed by
many applications simultaneously.

This package provides the library for GLib applications.")
    (license license:lgpl2.1+)))

(define-public dbus-c++
  (package
    (name "dbus-c++")
    (version "0.9.0")
    (source (origin
              (method url-fetch)
              (uri
               (string-append
                "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/"
                version "/libdbus-c%2B%2B-" version ".tar.gz"))
              (file-name (string-append name "-" version ".tar.gz"))
              (patches (search-patches "dbus-c++-gcc-compat.patch"
                                       "dbus-c++-threading-mutex.patch"))
              (sha256
               (base32
                "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw"))))
    (build-system gnu-build-system)
    (propagated-inputs
     (list dbus))                      ;mentioned in the pkg-config file
    (inputs
     (list efl expat glib libunwind))
    (native-inputs
     (list pkg-config))
    (arguments
     `(;; The 'configure' machinery fails to detect that it needs -lpthread.
       #:configure-flags (list "LDFLAGS=-lpthread")
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'add-missing-header
           (lambda _
             (substitute* "include/dbus-c++/eventloop-integration.h"
               (("#include <errno.h>")
                "#include <errno.h>\n#include <unistd.h>"))
             #t)))))
    (synopsis "D-Bus API for C++")
    (description "This package provides D-Bus client API bindings for the C++
programming language.  It also provides the @command{dbusxx-xml2cpp} and
@command{dbusxx-introspect} commands.")
    (home-page "https://sourceforge.net/projects/dbus-cplusplus/")
    (license license:lgpl2.1+)))

(define-public dbus-cxx
  (package
    (name "dbus-cxx")
    (version "0.12.0")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://sourceforge/dbus-cxx/dbus-cxx/"
                                  version "/dbus-cxx-" version ".tar.gz"))
              (sha256
               (base32
                "1acsgpkd9v7b9jdc79ijmh9dbdfrzgkwkaff518i3zpk7y6g5mzw"))))
    (build-system cmake-build-system)
    (arguments
     `(#:configure-flags '("-DENABLE_TESTS=ON"
                           "-DENABLE_TOOLS=ON"
                           "-DENABLE_GLIBMM=ON")))
    (inputs (list dbus
                  libsigc++
                  glibmm
                  python
                  popt
                  expat))
    (native-inputs (list pkg-config m4))
    (synopsis "C++ wrapper for dbus")
    (description "Dbus-cxx is a C++ wrapper for dbus.\n
It exposes the C API to allow direct manipulation and
relies on sigc++ to provide an Oriented Object interface.\n
This package provide 2 utils:
@enumerate
@item @command{dbus-cxx-xml2cpp} to generate proxy and adapter
@item @command{dbus-cxx-introspect} to introspect a dbus interface
@end enumerate

Some codes examples can be find at:
@url{https://dbus-cxx.github.io/examples.html}")
    (home-page "https://dbus-cxx.github.io/")
    (license license:gpl3)))

(define-public appstream-glib
  (package
    (name "appstream-glib")
    (version "0.7.18")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://people.freedesktop.org/~hughsient/"
                                  "appstream-glib/releases/"
                                  "appstream-glib-" version ".tar.xz"))
              (sha256
               (base32
                "00j0kkgf224nzmrha72g8pd72mymhph7vaisj35i4ffy7cpd47na"))))
    (build-system meson-build-system)
    (native-inputs
     `(("gettext" ,gettext-minimal)
       ("gsettings" ,gsettings-desktop-schemas) ; for ‘org.gnome.system.proxy’
       ("glib:bin" ,glib "bin")         ; for glib-compile-resources
       ("pkg-config" ,pkg-config)))
    (propagated-inputs
     `(("gcab" ,gcab) ; for .pc file
       ("gdk-pixbuf" ,gdk-pixbuf) ; for .pc file
       ("libuuid" ,util-linux "lib"))) ; for .pc file
    (inputs
     `(("glib" ,glib)
       ("gperf" ,gperf)
       ("gtk+" ,gtk+)
       ("json-glib" ,json-glib)
       ("libarchive" ,libarchive)
       ("libsoup" ,libsoup-minimal-2)))
    (arguments
     `(#:configure-flags
       (list "-Ddep11=false"
             "-Dintrospection=false"    ; avoid g-ir-scanner dependency
             "-Drpm=false"
             "-Dstemmer=false")
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch-tests
           (lambda _
             (substitute* "libappstream-glib/as-self-test.c"
               (("g_test_add_func.*as_test_store_local_appdata_func);") ""))
             #t))
         (add-before 'check 'set-home
           (lambda _
             ;; Some tests want write access there.
             (setenv "HOME" "/tmp"))))))
    (home-page "https://github.com/hughsie/appstream-glib")
    (synopsis "Library for reading and writing AppStream metadata")
    (description "This library provides objects and helper methods to help
reading and writing @uref{https://www.freedesktop.org/wiki/Distributions/AppStream,AppStream}
metadata.")
    (license license:lgpl2.1+)))

(define perl-net-dbus
  (package
    (name "perl-net-dbus")
    (version "1.2.0")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/Net-DBus-"
                           version ".tar.gz"))
       (sha256
        (base32
         "1g0w8i5scmh7kfy9mmvv8q326627qf38z26mvczmn8x1yjgar8g7"))))
    (build-system perl-build-system)
    (native-inputs
     (list pkg-config perl-test-pod perl-test-pod-coverage))
    (inputs
     (list dbus))
    (propagated-inputs
     (list perl-xml-twig))
    (home-page "https://metacpan.org/release/Net-DBus")
    (synopsis "Extension for the DBus bindings")
    (description "@code{Net::DBus} provides a Perl XS API to the DBus
inter-application messaging system.  The Perl API covers the core base level
of the DBus APIs, not concerning itself yet with the GLib or QT wrappers.")
    (license license:perl-license)))

(define perl-net-dbus-glib
  (package
    (name "perl-net-dbus-glib")
    (version "0.33.0")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/"
                           "Net-DBus-GLib-" version ".tar.gz"))
       (sha256
        (base32
         "1z4mbv8z0rad604xahijpg5szzi8qak07hbahh230z4jf96fkxvj"))))
    (build-system perl-build-system)
    (native-inputs
     (list pkg-config))
    (inputs
     (list dbus-glib))
    (home-page "https://metacpan.org/release/Net-DBus-GLib")
    (synopsis "Perl extension for the DBus GLib bindings")
    (description "This package provides an extension to the @code{Net::DBus}
module allowing integration with the GLib mainloop.  To integrate with the
main loop, simply get a connection to the bus via the methods in
@code{Net::DBus::GLib} rather than the usual @code{Net::DBus} module.  Every
other API remains the same.")
    (license license:gpl2+)))

(define-public template-glib
  (package
    (name "template-glib")
    (version "3.34.0")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnome/sources/" name "/"
                                  (version-major+minor version) "/"
                                  name "-" version ".tar.xz"))
              (sha256
               (base32
                "1z9xkin5fyfh071ma9y045jcw83hgx33dfbjraw6cxk0qdmfysr1"))))
    (build-system meson-build-system)
    (arguments
     `(#:configure-flags '("-D" "enable_gtk_doc=true")))
    (inputs
     `(("gettext" ,gettext-minimal)
       ("glib" ,glib)
       ("gobject-introspection" ,gobject-introspection)))
    (native-inputs
     `(("bison" ,bison)
       ("flex" ,flex)
       ("glib:bin" ,glib "bin") ;; For glib-mkenums
       ("gtk-doc" ,gtk-doc/stable)
       ("pkg-config" ,pkg-config)
       ("vala" ,vala)))
    (home-page "https://gitlab.gnome.org/GNOME/template-glib")
    (synopsis "Library for template expansion")
    (description
     "Template-GLib is a library to help you generate text based on a template and
user defined state.  Template-GLib does not use a language runtime, so it is
safe to use from any GObject-Introspectable language.

Template-GLib allows you to access properties on GObjects as well as call
simple methods via GObject-Introspection.")
    (license license:lgpl2.1+)))

(define-public xdg-dbus-proxy
  (package
    (name "xdg-dbus-proxy")
    (version "0.1.2")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/flatpak/xdg-dbus-proxy"
                                  "/releases/download/" version
                                  "/xdg-dbus-proxy-" version ".tar.xz"))
              (sha256
               (base32
                "03sj1h0c2l08xa8phw013fnxr4fgav7l2mkjhzf9xk3dykwxcj8p"))))
    (build-system gnu-build-system)
    (native-inputs
     (list pkg-config
           ;; For tests.
           dbus
           ;; These are required to build the manual.
           docbook-xml-4.3
           docbook-xsl
           libxml2
           libxslt))
    (inputs
     (list glib))
    (home-page "https://github.com/flatpak/xdg-dbus-proxy")
    (synopsis "D-Bus connection proxy")
    (description
     "xdg-dbus-proxy is a filtering proxy for D-Bus connections.  It can be
used to create D-Bus sockets inside a Linux container that forwards requests
to the host system, optionally with filters applied.")
    (license license:lgpl2.1+)))

(define-public dbus-test-runner
  (package
    (name "dbus-test-runner")
    (version "19.04.0")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "https://launchpad.net/dbus-test-runner/"
                    (version-major+minor version) "/" version
                    "/+download/dbus-test-runner-" version ".tar.gz"))
              (sha256
               (base32
                "0xnbay58xn0hav208mdsg8dd176w57dcpw1q2k0g5fh9v7xk4nk4"))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'configure 'fix-test-paths
           ;; add missing space
           (lambda* (#:key outputs #:allow-other-keys)
             (substitute* "Makefile.in"
               (("#!/bin/bash") (string-append "#!" (which "bash"))))
             (substitute* "tests/Makefile.in"
               (("/bin/sh") (which "sh"))
               (("#!/bin/bash") (string-append "#!" (which "bash")))
               (("echo cat") (string-append "echo " (which "cat")))
               (("/bin/true") (which "true")))
             #t)))))
    (inputs
     (list gtk+ glib dbus-glib))
    (native-inputs
     `(("glib:bin" ,glib "bin")
       ("intltool" ,intltool)
       ("pkg-config" ,pkg-config)
       ;; following used for tests
       ("python" ,python)
       ("python-dbusmock" ,python-dbusmock)
       ("xvfb" ,xorg-server-for-tests)))
    (home-page "https://launchpad.net/dbus-test-runner")
    (synopsis "Run a executables under a new DBus session for testing")
    (description "A small little utility to run a couple of executables under a
new DBus session for testing.")
    (license license:gpl3)))
(map (lambda (path) (string-append path "/lib/lua/5.2/?.so;" path "/lib/lua/5.2/?/?.so")) (cons out deps)) ";")) (openssl (assoc-ref inputs "openssl")) (coreutils (assoc-ref inputs "coreutils")) (path (map (lambda (dir) (string-append dir "/bin")) (list openssl coreutils)))) (for-each (lambda (file) (wrap-program file `("LUA_PATH" ";" = (,lua-path)) `("LUA_CPATH" ";" = (,lua-cpath)) `("PATH" ":" prefix ,path))) (find-files bin ".*")) #t)))))) (inputs `(("libidn" ,libidn) ("openssl" ,openssl) ("lua" ,lua-5.2) ("lua5.2-bitop" ,lua5.2-bitop) ("lua5.2-expat" ,lua5.2-expat) ("lua5.2-socket" ,lua5.2-socket) ("lua5.2-filesystem" ,lua5.2-filesystem) ("lua5.2-sec" ,lua5.2-sec))) (home-page "https://prosody.im/") (synopsis "Jabber (XMPP) server") (description "Prosody is a modern XMPP communication server. It aims to be easy to set up and configure, and efficient with system resources. Additionally, for developers it aims to be easy to extend and give a flexible system on which to rapidly develop added functionality, or prototype new protocols.") (license license:x11))) (define-public prosody-http-upload (let ((changeset "765735bb590b") (revision "1")) (package (name "prosody-http-upload") (version (string-append "0-" revision "." (string-take changeset 7))) (source (origin (method hg-fetch) (uri (hg-reference (url "https://hg.prosody.im/prosody-modules/") (changeset changeset))) (file-name (string-append name "-" version "-checkout")) (sha256 (base32 "142wrcism70nf8ffahhd961cqg2pi1h7ic8adfs3zwh0j3pnf41f")))) (build-system trivial-build-system) (arguments '(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils)) (let ((out (assoc-ref %outputs "out")) (source (assoc-ref %build-inputs "source"))) (with-directory-excursion (in-vicinity source "mod_http_upload") (install-file "mod_http_upload.lua" out)) #t)))) (home-page "https://modules.prosody.im/mod_http_upload.html") (synopsis "XEP-0363: Allow clients to upload files over HTTP") (description "This module implements XEP-0363: it allows clients to upload files over HTTP.") (license (package-license prosody))))) (define-public prosody-smacks (let ((changeset "67f1d1f22625") (revision "1")) (package (name "prosody-smacks") (version (string-append "0-" revision "." (string-take changeset 7))) (source (origin (method hg-fetch) (uri (hg-reference (url "https://hg.prosody.im/prosody-modules/") (changeset changeset))) (file-name (string-append name "-" version "-checkout")) (sha256 (base32 "020ngpax30fgarah98yvlj0ni8rcdwq60if03a9hqdw8mic0nxxs")))) (build-system trivial-build-system) (arguments '(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils)) (let ((out (assoc-ref %outputs "out")) (source (assoc-ref %build-inputs "source"))) (with-directory-excursion (in-vicinity source "mod_smacks") (install-file "mod_smacks.lua" out)) #t)))) (home-page "https://modules.prosody.im/mod_smacks.html") (synopsis "XEP-0198: Reliability and fast reconnects for XMPP") (description "This module implements XEP-0198: when supported by both the client and server, it can allow clients to resume a disconnected session, and prevent message loss.") (license (package-license prosody))))) (define-public libtoxcore (let ((revision "2") (commit "bf69b54f64003d160d759068f4816b2d9b2e1e21")) (package (name "libtoxcore") (version (string-append "0.0.0" "-" revision "."(string-take commit 7))) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/irungentoo/toxcore.git") (commit commit))) (file-name (string-append name "-" version "-checkout")) (sha256 (base32 "11lqra4yd7v293cp286ynff5lqz1pprzg8vn3wq6vryj08g88zqb")))) (build-system gnu-build-system) (arguments `(#:tests? #f)) ; FIXME: tests hang, some fail. (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) ("libtool" ,libtool) ("check" ,check) ("pkg-config" ,pkg-config))) (inputs `(("libsodium" ,libsodium) ("opus" ,opus) ("libvpx" ,libvpx))) (synopsis "Library for the Tox encrypted messenger protocol") (description "C library implementation of the Tox encrypted messenger protocol.") (license license:gpl3+) (home-page "https://tox.chat")))) ;; Some tox clients move to c-toxcore, which seems to be where all the ;; recent development happens. It is run by the same developers as toxcore, ;; forked into a group namespace. (define-public c-toxcore (package (name "c-toxcore") (version "0.2.9") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/TokTok/c-toxcore.git") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0aljr9hqybla6p61af6fdkv0x8gph7c2wacqqa9hq2z9w0p4fs5j")))) (arguments `(#:tests? #f)) ; FIXME: Testsuite seems to stay stuck on test 3. Disable ; for now. (build-system cmake-build-system) (native-inputs `(("pkg-config" ,pkg-config))) (propagated-inputs `(("libsodium" ,libsodium) ("opus" ,opus) ("libvpx" ,libvpx))) (home-page "https://tox.chat") (synopsis "Library for the Tox encrypted messenger protocol") (description "Official fork of the C library implementation of the Tox encrypted messenger protocol.") (license license:gpl3+))) (define-public utox (package (name "utox") (version "0.17.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/uTox/uTox.git") (commit (string-append "v" version)) (recursive? #t))) ;; Needed for 'minini' git submodule. (file-name (string-append name "-" version "-checkout")) (sha256 (base32 "17kwqw24iqljp2icih9k6ikx12gzr8zzqr8y5h35bg8m5s8pasq5")))) (build-system cmake-build-system) (arguments `(#:configure-flags '("-DENABLE_TESTS=on") #:phases (modify-phases %standard-phases (add-before 'build 'patch-absolute-filename-libgtk-3 (lambda* (#:key inputs outputs #:allow-other-keys) (substitute* "../source/src/xlib/gtk.c" (("libgtk-3.so") (string-append (assoc-ref inputs "gtk+") "/lib/libgtk-3.so"))))) (add-after 'install 'wrap-program (lambda* (#:key inputs outputs #:allow-other-keys) (wrap-program (string-append (assoc-ref outputs "out") "/bin/utox") ;; For GtkFileChooserDialog. `("GSETTINGS_SCHEMA_DIR" = (,(string-append (assoc-ref inputs "gtk+") "/share/glib-2.0/schemas"))))))))) (inputs `(("dbus" ,dbus) ("filteraudio" ,filteraudio) ("fontconfig" ,fontconfig) ("freetype" ,freetype) ("libsodium" ,libsodium) ("c-toxcore" ,c-toxcore) ("gtk+" ,gtk+) ("libvpx" ,libvpx) ("libx11" ,libx11) ("libxext" ,libxext) ("libxrender" ,libxrender) ("openal" ,openal) ("v4l-utils" ,v4l-utils))) (native-inputs `(("check" ,check) ("pkg-config" ,pkg-config))) (synopsis "Lightweight Tox client") (description "Utox is a lightweight Tox client. Tox is a distributed and secure instant messenger with audio and video chat capabilities.") (home-page "http://utox.org/") (license license:gpl3))) (define-public qtox (package (name "qtox") (version "1.16.3") (source (origin (method url-fetch) (uri (string-append "https://github.com/qTox/qTox/archive/v" version ".tar.gz")) (sha256 (base32 "10n3cgw9xaqin9la8wpd8v83bkjmimicgbyp5ninsdgsrgky4hmq")) (file-name (string-append name "-" version ".tar.gz")))) (build-system cmake-build-system) (arguments '(#:phases (modify-phases %standard-phases (add-after 'unpack 'fix-reproducibility-issues (lambda _ (substitute* "src/main.cpp" (("__DATE__") "\"\"") (("__TIME__") "\"\"") (("TIMESTAMP") "\"\"")) #t)) ;; Ensure that icons are found at runtime. (add-after 'install 'wrap-executable (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (wrap-program (string-append out "/bin/qtox") `("QT_PLUGIN_PATH" prefix ,(list (string-append (assoc-ref inputs "qtsvg") "/lib/qt5/plugins/")))))))))) (inputs `(("ffmpeg" ,ffmpeg) ("filteraudio" ,filteraudio) ("glib" ,glib) ("gtk+" ,gtk+-2) ("libsodium" ,libsodium) ("c-toxcore" ,c-toxcore) ("libvpx" ,libvpx) ("libxscrnsaver" ,libxscrnsaver) ("libx11" ,libx11) ("libexif" ,libexif) ("sqlite" ,sqlite) ("openal" ,openal) ("qrencode" ,qrencode) ("qtbase" ,qtbase) ("qtsvg" ,qtsvg) ("sqlcipher" ,sqlcipher))) (native-inputs `(("pkg-config" ,pkg-config) ("qmake" ,qttools))) (home-page "https://qtox.github.io/") (synopsis "Tox chat client using Qt") (description "qTox is a Tox client that follows the Tox design guidelines. It provides an easy to use application that allows you to connect with friends and family without anyone else listening in.") (license license:gpl3+))) (define-public pybitmessage (package (name "pybitmessage") (version "0.6.3.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/Bitmessage/PyBitmessage.git") (commit version))) (file-name (string-append name "-" version "-checkout")) (sha256 (base32 "1lmhbpwsqh1v93krlqqhafw2pc3y0qp8zby186yllbph6s8kdp35")))) (propagated-inputs ;; TODO: ;; Package "pyopencl", required in addition to numpy for OpenCL support. ;; Package "gst123", required in addition to alsa-utils and ;; mpg123 for sound support. `(("python2-msgpack" ,python2-msgpack) ("python2-pythondialog" ,python2-pythondialog) ("python2-pyqt-4" ,python2-pyqt-4) ("python2-sip" ,python2-sip) ("python2-pysqlite" ,python2-pysqlite) ("python2-pyopenssl" ,python2-pyopenssl))) (native-inputs `(("openssl" ,openssl))) (build-system python-build-system) (arguments `(#:modules ((guix build python-build-system) (guix build utils)) #:tests? #f ;no test target #:python ,python-2 #:phases (modify-phases %standard-phases (add-after 'unpack 'fix-unmatched-python-shebangs (lambda* (#:key inputs #:allow-other-keys) (substitute* "src/bitmessagemain.py" (("#!/usr/bin/env python2.7") (string-append "#!" (which "python")))) (substitute* "src/bitmessagecli.py" (("#!/usr/bin/env python2.7.x") (string-append "#!" (which "python")))) #t)) (add-after 'unpack 'fix-depends (lambda* (#:key inputs #:allow-other-keys) (substitute* "src/depends.py" (("libcrypto.so") (string-append (assoc-ref inputs "openssl") "/lib/libcrypto.so"))) #t)) (add-after 'unpack 'fix-local-files-in-paths (lambda* (#:key outputs #:allow-other-keys) (substitute* "src/proofofwork.py" (("bitmsghash.so") (string-append (assoc-ref outputs "out") "/lib/bitmsghash.so"))) #t)) (add-after 'unpack 'fix-pyelliptic (lambda* (#:key inputs #:allow-other-keys) (substitute* "src/pyelliptic/openssl.py" (("libcrypto.so") (string-append (assoc-ref inputs "openssl") "/lib/libcrypto.so")) (("libssl.so") (string-append (assoc-ref inputs "openssl") "/lib/libssl.so"))) #t)) (add-after 'unpack 'noninteractive-build ;; This applies upstream commit 4c597d3f7cf9f83a763472aa165a1a4292019f20 (lambda _ (substitute* "setup.py" (("except NameError") "except EOFError, NameError")) #t)) ;; XXX: python setup.py does not build and install bitmsghash, ;; without it PyBitmessage tries to compile it at first run ;; in the store, which due to obvious reasons fails. Do it ;; and place it in /lib. (add-after 'unpack 'build-and-install-bitmsghash (lambda* (#:key outputs #:allow-other-keys) (with-directory-excursion "src/bitmsghash" (system* "make") (install-file "bitmsghash.so" (string-append (assoc-ref outputs "out") "/lib"))) #t))))) (license license:expat) (description "Distributed and trustless peer-to-peer communications protocol for sending encrypted messages to one person or many subscribers.") (synopsis "Distributed peer-to-peer communication") (home-page "https://bitmessage.org/"))) (define-public ytalk (package (name "ytalk") (version "3.3.0") (source (origin (method url-fetch) (uri (string-append "ftp://ftp.ourproject.org/pub/ytalk/ytalk-" version ".tar.gz")) (sha256 (base32 "1d3jhnj8rgzxyxjwfa22vh45qwzjvxw1qh8fz6b7nfkj3zvk9jvf")))) (build-system gnu-build-system) (inputs `(("ncurses" ,ncurses))) (home-page "https://ytalk.ourproject.org") (synopsis "Multi-user chat program") (description "Ytalk is a replacement for the BSD talk program. Its main advantage is the ability to communicate with any arbitrary number of users at once. It supports both talk protocols (\"talk\" and \"ntalk\") and can communicate with several different talk daemons at the same time.") (license license:gpl2+))) (define-public gloox (package (name "gloox") (version "1.0.23") (source (origin (method url-fetch) (uri (string-append "https://camaya.net/download/gloox-" version ".tar.bz2")) (sha256 (base32 "12jz8glg9zmyk0iyv1ywf5i0hq93dfq8lvn6lyjgy8730w66mjwp")))) (build-system gnu-build-system) (inputs `(("libidn" ,libidn) ("gnutls" ,gnutls) ("zlib" ,zlib))) (native-inputs `(("pkg-config" ,pkg-config))) (synopsis "Portable high-level Jabber/XMPP library for C++") (description "gloox is a full-featured Jabber/XMPP client library, written in ANSI C++. It makes writing spec-compliant clients easy and allows for hassle-free integration of Jabber/XMPP functionality into existing applications.") (home-page "https://camaya.net/gloox") (license license:gpl3))) (define-public perl-net-psyc (package (name "perl-net-psyc") (version "1.3") (source (origin (method url-fetch) (uri (string-append "https://perl.psyc.eu/" "perlpsyc-" version ".zip")) (file-name (string-append name "-" version ".zip")) (sha256 (base32 "0vsjclglkwgbyd9m5ad642fyysxw2x725nhq4r2m9pvqaq6s5yf2")))) (build-system perl-build-system) (native-inputs `(("unzip" ,unzip))) (inputs `(("perl-curses" ,perl-curses) ("perl-io-socket-ssl" ,perl-io-socket-ssl))) (arguments `(#:phases (modify-phases %standard-phases (delete 'configure) ; No configure script ;; There is a Makefile, but it does not install everything ;; (leaves out psycion) and says ;; "# Just to give you a rough idea". XXX: Fix it upstream. (replace 'build (lambda _ (invoke "make" "manuals"))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (doc (string-append out "/share/doc/perl-net-psyc")) (man1 (string-append out "/share/man/man1")) (man3 (string-append out "/share/man/man3")) (bin (string-append out "/bin")) (libpsyc (string-append out "/lib/psyc/ion")) (libperl (string-append out "/lib/perl5/site_perl/" ,(package-version perl)))) (copy-recursively "lib/perl5" libperl) (copy-recursively "lib/psycion" libpsyc) (copy-recursively "bin" bin) (install-file "cgi/psycpager" (string-append doc "/cgi")) (copy-recursively "contrib" (string-append doc "/contrib")) (copy-recursively "hooks" (string-append doc "/hooks")) (copy-recursively "sdj" (string-append doc "/sdj")) (install-file "README.txt" doc) (install-file "TODO.txt" doc) (copy-recursively "share/man/man1" man1) (copy-recursively "share/man/man3" man3) #t))) (add-after 'install 'wrap-programs (lambda* (#:key outputs #:allow-other-keys) ;; Make sure all executables in "bin" find the Perl modules ;; provided by this package at runtime. (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin/")) (path (getenv "PERL5LIB"))) (for-each (lambda (file) (wrap-program file `("PERL5LIB" ":" prefix (,path)))) (find-files bin "\\.*$")) #t)))))) (description "@code{Net::PSYC} with support for TCP, UDP, Event.pm, @code{IO::Select} and Gtk2 event loops. This package includes 12 applications and additional scripts: psycion (a @uref{https://about.psyc.eu,PSYC} chat client), remotor (a control console for @uref{https://torproject.org,tor} router) and many more.") (synopsis "Perl implementation of PSYC protocol") (home-page "https://perl.psyc.eu") (license (list license:gpl2 license:perl-license ;; contrib/irssi-psyc.pl: license:public-domain ;; bin/psycplay states AGPL with no version: license:agpl3+)))) (define-public libpsyc (package (name "libpsyc") (version "20160913") (source (origin (method url-fetch) (uri (string-append "http://www.psyced.org/files/" name "-" version ".tar.xz")) (sha256 (base32 "14q89fxap05ajkfn20rnhc6b1h4i3i2adyr7y6hs5zqwb2lcmc1p")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl) ("netcat" ,netcat) ("procps" ,procps))) (arguments `(#:make-flags (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out"))) #:phases (modify-phases %standard-phases ;; The rust bindings are the only ones in use, the lpc bindings ;; are in psyclpc. The other bindings are not used by anything, ;; the chances are high that the bindings do not even work, ;; therefore we do not include them. ;; TODO: Get a cargo build system in Guix. (delete 'configure)))) ; no configure script (home-page "https://about.psyc.eu/libpsyc") (description "@code{libpsyc} is a PSYC library in C which implements core aspects of PSYC, useful for all kinds of clients and servers including psyced.") (synopsis "PSYC library in C") (license license:agpl3+))) ;; This commit removes the historic bundled pcre and makes psyclpc reproducible. (define-public psyclpc (let* ((commit "61cf9aa81297085e5c40170fd01221c752f8deba") (revision "2")) (package (name "psyclpc") (version (string-append "20160821-" revision "." (string-take commit 7))) (source (origin (method git-fetch) (uri (git-reference (url "git://git.psyced.org/git/psyclpc") (commit commit))) (file-name (string-append name "-" version "-checkout")) (sha256 (base32 "1viwqymbhn3cwvx0zl58rlzl5gw47zxn0ldg2nbi55ghm5zxl1z5")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; There are no tests/checks. #:configure-flags ;; If you have questions about this part, look at ;; "src/settings/psyced" and the ebuild. (list "--enable-use-tls=yes" "--enable-use-mccp" ; Mud Client Compression Protocol, leave this enabled. (string-append "--prefix=" (assoc-ref %outputs "out")) ;; src/Makefile: Set MUD_LIB to the directory which contains ;; the mud data. defaults to MUD_LIB = @libdir@ (string-append "--libdir=" (assoc-ref %outputs "out") "/opt/psyced/world") (string-append "--bindir=" (assoc-ref %outputs "out") "/opt/psyced/bin") ;; src/Makefile: Set ERQ_DIR to directory which contains the ;; stuff which ERQ can execute (hopefully) savely. Was formerly ;; defined in config.h. defaults to ERQ_DIR= @libexecdir@ (string-append "--libexecdir=" (assoc-ref %outputs "out") "/opt/psyced/run")) #:phases (modify-phases %standard-phases (add-before 'configure 'chdir-to-src ;; We need to pass this as env variables ;; and manually change the directory. (lambda _ (chdir "src") (setenv "CONFIG_SHELL" (which "sh")) (setenv "SHELL" (which "sh")) #t))) #:make-flags (list "install-all"))) (inputs `(("zlib" ,zlib) ("openssl" ,openssl-1.0) ("pcre" ,pcre))) (native-inputs `(("pkg-config" ,pkg-config) ("bison" ,bison) ("gettext" ,gettext-minimal) ("help2man" ,help2man) ("autoconf" ,autoconf) ("automake" ,automake))) (home-page "http://lpc.psyc.eu/") (synopsis "psycLPC is a multi-user network server programming language") (description "LPC is a bytecode language, invented to specifically implement multi user virtual environments on the internet. This technology is used for MUDs and also the psyced implementation of the Protocol for SYnchronous Conferencing (PSYC). psycLPC is a fork of LDMud with some new features and many bug fixes.") (license license:gpl2)))) (define-public loudmouth (package (name "loudmouth") (version "1.5.3") (source (origin (method url-fetch) (uri (string-append "https://mcabber.com/files/loudmouth/" name "-" version ".tar.bz2")) (sha256 (base32 "0b6kd5gpndl9nzis3n6hcl0ldz74bnbiypqgqa1vgb0vrcar8cjl")))) (build-system gnu-build-system) (inputs `(("glib" ,glib) ("gnutls" ,gnutls) ("libidn" ,libidn))) (native-inputs `(("pkg-config" ,pkg-config) ("check" ,check) ("glib" ,glib "bin") ; gtester ("gtk-doc" ,gtk-doc))) (home-page "https://mcabber.com/") (description "Loudmouth is a lightweight and easy-to-use C library for programming with the XMPP (formerly known as Jabber) protocol. It is designed to be easy to get started with and yet extensible to let you do anything the XMPP protocol allows.") (synopsis "Asynchronous XMPP library") ;; The files have LGPL2.0+ headers, but COPYING specifies LGPL2.1. (license license:lgpl2.0+))) (define-public mcabber (package (name "mcabber") (version "1.1.0") (source (origin (method url-fetch) (uri (string-append "https://mcabber.com/files/" name "-" version ".tar.bz2")) (sha256 (base32 "1ggh865p1rf10ffsnf4g6qv9i8bls36dxdb1nzs5r9vdqci2rz04")))) (build-system gnu-build-system) (arguments '(#:configure-flags (list "--enable-otr" "--enable-aspell"))) (inputs `(("gpgme" ,gpgme) ("libotr" ,libotr) ("aspell" ,aspell) ("libidn" ,libidn) ("glib" ,glib) ("ncurses" ,ncurses) ("loudmouth" ,loudmouth))) (native-inputs `(("pkg-config" ,pkg-config))) (home-page "https://mcabber.com") (description "Mcabber is a small XMPP (Jabber) console client, which includes features such as SASL and TLS support, @dfn{Multi-User Chat} (MUC) support, logging, command-completion, OpenPGP encryption, @dfn{Off-the-Record Messaging} (OTR) support, and more.") (synopsis "Small XMPP console client") (license license:gpl2+))) (define-public freetalk (package (name "freetalk") (version "4.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/freetalk/freetalk-" version ".tar.gz")) (sha256 (base32 "1rmrn7a1bb7vm26yaklrvx008a9qhwc32s57dwrlf40lv9gffwny")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases ;; For 'system' commands in Scheme code. (add-after 'install 'wrap-program (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bash (assoc-ref inputs "bash")) (coreutils (assoc-ref inputs "coreutils")) (less (assoc-ref inputs "less"))) (wrap-program (string-append out "/bin/freetalk") `("PATH" ":" prefix ,(map (lambda (dir) (string-append dir "/bin")) (list bash coreutils less)))) #t)))))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) ("pkg-config" ,pkg-config) ("texinfo" ,texinfo))) (inputs `(("bash" ,bash) ("glib" ,glib) ("guile" ,guile-2.0) ("less" ,less) ("loudmouth" ,loudmouth) ("readline" ,readline))) (synopsis "Extensible console-based Jabber client") (description "GNU Freetalk is a command-line Jabber/XMPP chat client. It notably uses the Readline library to handle input, so it features convenient navigation of text as well as tab-completion of buddy names, commands and English words. It is also scriptable and extensible via Guile.") (home-page "https://www.gnu.org/software/freetalk/") (license license:gpl3+))) (define-public libmesode (package (name "libmesode") (version "0.9.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/boothj5/libmesode.git") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "0xzfg1xx88cn36352nnjlb1p7xyw32yqkhjzq10px88iaaqz1vv0")))) (build-system gnu-build-system) (inputs `(("expat" ,expat) ("openssl" ,openssl))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) ("libtool" ,libtool) ("pkg-config" ,pkg-config))) (synopsis "C library for writing XMPP clients") (description "Libmesode is a fork of libstrophe for use with Profanity XMPP Client. In particular, libmesode provides extra TLS functionality such as manual SSL certificate verification.") (home-page "https://github.com/boothj5/libmesode") ;; Dual-licensed. (license (list license:gpl3+ license:x11)))) (define-public libstrophe (package (name "libstrophe") (version "0.9.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/strophe/libstrophe.git") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1g1l0w9z9hdy5ncdvd9097gi7k7783did6py5h9camlpb2fnk5mk")))) (build-system gnu-build-system) (inputs `(("expat" ,expat) ("openssl" ,openssl))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) ("libtool" ,libtool) ("pkg-config" ,pkg-config))) (synopsis "C library for writing XMPP clients") (description "Libstrophe is a minimal XMPP library written in C. It has almost no external dependencies, only an XML parsing library (expat or libxml are both supported).") (home-page "http://strophe.im/libstrophe") ;; Dual-licensed. (license (list license:gpl3+ license:x11)))) (define-public profanity (package (name "profanity") (version "0.8.1") (source (origin (method url-fetch) (uri (string-append "https://profanity-im.github.io/profanity-" version ".tar.gz")) (sha256 (base32 "15yrx2ir2bilxpjfaxpjb93yjpvpvcvh5r7wbsjx6kmmy7qg2zvb")))) (build-system gnu-build-system) (arguments '(#:configure-flags (list "--enable-c-plugins" "--enable-otr" "--enable-omemo" "--enable-pgp" "--enable-icons" "--enable-notifications"))) (inputs `(("curl" ,curl) ("expat" ,expat) ("glib" ,glib) ("gpgme" ,gpgme) ("libmesode" ,libmesode) ("libotr" ,libotr) ("ncurses" ,ncurses) ("openssl" ,openssl) ("readline" ,readline))) (native-inputs `(("autoconf" ,autoconf) ("autoconf-archive" ,autoconf-archive) ("automake" ,automake) ("cmocka" ,cmocka) ("gtk+" ,gtk+-2) ("libnotify" ,libnotify) ("libtool" ,libtool) ("libsignal-protocol-c" ,libsignal-protocol-c) ("pkg-config" ,pkg-config))) (synopsis "Console-based XMPP client") (description "Profanity is a console based XMPP client written in C using ncurses and libmesode, inspired by Irssi.") (home-page "https://profanity-im.github.io") (license license:gpl3+))) (define-public libircclient (package (name "libircclient") (version "1.10") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/libircclient/libircclient/" version "/libircclient-" version ".tar.gz")) (sha256 (base32 "0b9wa0h3xc31wpqlvgxgnvqp5wgx3kwsf5s9432m5cj8ycx6zcmv")))) (build-system gnu-build-system) (inputs `(("openssl" ,openssl))) (arguments `(#:configure-flags (list (string-append "--libdir=" (assoc-ref %outputs "out") "/lib") "--enable-shared" "--enable-ipv6" "--enable-openssl") #:tests? #f)) ; no test suite (home-page "https://www.ulduzsoft.com/libircclient/") (synopsis "Library implementing the client IRC protocol") (description "Libircclient is a library which implements the client IRC protocol. It is designed to be small, fast, portable and compatible with the RFC standards as well as non-standard but popular features. It can be used for building the IRC clients and bots.") (license license:lgpl3+))) (define-public toxic (package (name "toxic") (version "0.8.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/JFreegman/toxic.git") (commit (string-append "v" version)))) (sha256 (base32 "09l2j3lwvrq7bf3051vjsnml9w63790ly3iylgf26gkrmld6k31w")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests #:make-flags (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out"))) #:phases (modify-phases %standard-phases (delete 'configure) (add-before 'build 'enable-python-scripting (lambda _ (setenv "ENABLE_PYTHON" "1") #t))))) (inputs `(("c-toxcore" ,c-toxcore) ("curl" ,curl) ("freealut" ,freealut) ("gdk-pixbuf" ,gdk-pixbuf) ; for libnotify.pc ("libconfig" ,libconfig) ("libnotify" ,libnotify) ("libpng" ,libpng) ("libvpx" ,libvpx) ("libx11" ,libx11) ("ncurses" ,ncurses) ("openal" ,openal) ("python" ,python) ("qrencode" ,qrencode))) (native-inputs `(("pkg-config" ,pkg-config))) (home-page "https://github.com/JFreegman/toxic") (synopsis "Tox chat client using ncurses") (description "Toxic is a console-based instant messaging client, using c-toxcore and ncurses. It provides audio calls, sound and desktop notifications, and Python scripting support.") (license license:gpl3+))) (define-public libqmatrixclient (package (name "libqmatrixclient") (version "0.5.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/QMatrixClient/libqmatrixclient") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1bhlqfs7251fss4icx794ka614npr6zyrpp4qwc4q5408ykfm7lr")))) (build-system cmake-build-system) (inputs `(("qtbase" ,qtbase) ("qtmultimedia" ,qtmultimedia))) (arguments `(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON") #:tests? #f)) ; no tests (home-page "https://matrix.org/docs/projects/sdk/libqmatrixclient.html") (synopsis "Qt5 client library for the Matrix instant messaging protocol") (description "libqmatrixclient is a Qt5 library to write clients for the Matrix instant messaging protocol. Quaternion is the reference client implementation. Quaternion and libqmatrixclient together form the QMatrixClient project.") (license license:lgpl2.1+))) (define-public mtxclient (package (name "mtxclient") (version "0.2.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/Nheko-Reborn/mtxclient.git") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0pycznrvj57ff6gbwfn1xj943d2dr4vadl79hii1z16gn0nzxpmj")))) (arguments `(#:configure-flags (list ;; Disable example binaries (not installed) "-DBUILD_LIB_EXAMPLES=OFF") #:phases (modify-phases %standard-phases (add-before 'configure 'disable-network-tests (lambda _ (substitute* "CMakeLists.txt" (("add_test\\((BasicConnectivity|ClientAPI|MediaAPI|Encryption)") "# add_test")) #t)) (add-before 'configure 'set-home (lambda _ ;; Tries to create package registry file ;; So, set HOME. (setenv "HOME" "/tmp") #t))))) (build-system cmake-build-system) (inputs `(("boost" ,boost) ("json-modern-cxx" ,json-modern-cxx) ("libolm" ,libolm) ("libsodium" ,libsodium) ("openssl" ,openssl) ("spdlog" ,spdlog) ("zlib" ,zlib))) (native-inputs `(("googletest" ,googletest) ("pkg-config" ,pkg-config))) (home-page "https://github.com/Nheko-Reborn/mtxclient") (synopsis "Client API library for the Matrix protocol") (description "@code{mtxclient} is a C++ library that implements client API for the Matrix protocol. It is built on to of @code{Boost.Asio}.") (license license:expat))) (define-public nheko (package (name "nheko") (version "0.6.4") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/Nheko-Reborn/nheko.git") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "19dkc98l1q4070v6mli4ybqn0ip0za607w39hjf0x8rqdxq45iwm")))) (arguments `(#:tests? #f ;no test target #:configure-flags (list "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_CXX_FLAGS=-fpermissive") #:phases (modify-phases %standard-phases (add-after 'unpack 'remove-Werror (lambda _ (substitute* "CMakeLists.txt" (("-Werror") "")) #t)) (add-after 'unpack 'fix-determinism (lambda _ ;; Make Qt deterministic. (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1") #t))))) (build-system qt-build-system) (inputs `(("boost" ,boost) ("cmark" ,cmark) ("json-modern-cxx" ,json-modern-cxx) ("libolm" ,libolm) ("lmdb" ,lmdb) ("lmdbxx" ,lmdbxx) ("mtxclient" ,mtxclient) ("openssl" ,openssl) ("qtbase" ,qtbase) ("qtsvg" ,qtsvg) ("qtmultimedia" ,qtmultimedia) ("spdlog" ,spdlog) ("tweeny" ,tweeny) ("zlib" ,zlib))) (native-inputs `(("pkg-config" ,pkg-config) ("qtlinguist" ,qttools))) (home-page "https://github.com/Nheko-Reborn/nheko") (synopsis "Desktop client for Matrix using Qt and C++14") (description "@code{Nheko} want to provide a native desktop app for the Matrix protocol that feels more like a mainstream chat app and less like an IRC client. There is support for: @itemize @item E2E encryption (text messages only: attachments are currently sent unencrypted). @item User registration. @item Creating, joining & leaving rooms. @item Sending & receiving invites. @item Sending & receiving files and emoji. @item Typing notifications. @item Username auto-completion. @item Message & mention notifications. @item Redacting messages. @item Read receipts. @item Basic communities support. @item Room switcher (@key{ctrl-K}). @item Light, Dark & System themes. @end itemize") (license license:gpl3+))) (define-public quaternion (package (name "quaternion") (version "0.0.9.4c") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/QMatrixClient/Quaternion") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "0gpv6b3nn3lsyym8809kiqkpdszfasldqjpk5s542zyn41gdlql4")))) (build-system qt-build-system) (inputs `(("libqmatrixclient" ,libqmatrixclient) ("qtbase" ,qtbase) ("qtdeclarative" ,qtdeclarative) ("qtmultimedia" ,qtmultimedia) ("qtquickcontrols" ,qtquickcontrols) ("qtquickcontrols2" ,qtquickcontrols2) ("qtsvg" ,qtsvg) ("qttools" ,qttools))) (arguments `(#:tests? #f)) ; no tests (home-page "https://matrix.org/docs/projects/client/quaternion.html") (synopsis "Graphical client for the Matrix instant messaging protocol") (description "Quaternion is a Qt5 desktop client for the Matrix instant messaging protocol. It uses libqmatrixclient and is its reference client implementation. Quaternion and libqmatrixclient together form the QMatrixClient project.") (license (list license:gpl3+ ; all source code license:lgpl3+)))) ; icons/breeze (define-public hangups (package (name "hangups") (version "0.4.10") (source (origin (method url-fetch) (uri (pypi-uri "hangups" version)) (sha256 (base32 "0ww9z9kcb02pwnr8q1ll31wkzspc1fci1ly8ifrwzxysp4rxy3j5")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'build 'relax-dependencies ;; Relax overly strict package version specifications. (lambda _ (substitute* "setup.py" (("==") ">=")) #t))))) (propagated-inputs `(("python-aiohttp" ,python-aiohttp) ("python-appdirs" ,python-appdirs) ("python-async-timeout" ,python-async-timeout) ("python-configargparse" ,python-configargparse) ("python-mechanicalsoup" ,python-mechanicalsoup) ("python-protobuf" ,python-protobuf-3.6) ("python-readlike" ,python-readlike) ("python-reparser" ,python-reparser) ("python-requests" ,python-requests) ("python-urwid" ,python-urwid))) (native-inputs `(("python-httpretty" ,python-httpretty) ("python-pytest" ,python-pytest))) (home-page "https://hangups.readthedocs.io/") (synopsis "Instant messaging client for Google Hangouts") (description "Hangups is an instant messaging client for Google Hangouts. It includes both a Python library and a reference client with a text-based user interface. Hangups is implements a reverse-engineered version of Hangouts' proprietary, non-interoperable protocol, which allows it to support features like group messaging that aren’t available to clients that connect over XMPP.") (license license:expat))) (define-public telegram-purple (package (name "telegram-purple") (version "1.4.2") (home-page "https://github.com/majn/telegram-purple") (source (origin (method git-fetch) (uri (git-reference (url home-page) (commit (string-append "v" version)) (recursive? #t))) (sha256 (base32 "0imbzhhq9qbj6gvkckrnjhls2vvmmy8db7l6gsd7lng2pbfcn522")) (modules '((guix build utils))) (snippet '(begin (substitute* "Makefile.in" ;; By default these two directories point to Pidgin's own ;; prefix. (("^PLUGIN_DIR_PURPLE=.*") (string-append "exec_prefix := @exec_prefix@\n" "PLUGIN_DIR_PURPLE := @libdir@/purple-2\n")) (("^DATA_ROOT_DIR_PURPLE=.*") "DATA_ROOT_DIR_PURPLE := @datarootdir@\n") ;; Honor sysconfdir instead of trying to write to /etc. (("DESTDIR\\)/etc/telegram-purple") "DESTDIR)@sysconfdir@/telegram-purple")) #t)) (patches (search-patches "telegram-purple-adjust-test.patch")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("gettext" ,gettext-minimal) ("which" ,which))) (inputs `(("pidgin" ,pidgin) ("libgcrypt" ,libgcrypt) ("libwebp" ,libwebp) ("glib" ,glib) ("gtk+" ,gtk+-2) ("zlib" ,zlib))) (arguments `(#:phases (modify-phases %standard-phases ;; We're using release tag for repository checkout - let's prepare ;; header defining GIT_COMMIT manually instead of running git to ;; identify version which is being compiled. Git repository ;; is removed anyway and only source code is kept. (add-after 'unpack 'prepare-commit.h (lambda _ (with-output-to-file "./commit.h" (lambda () (display (string-append "//generated by guix, use version instead of " "commit\n" "#ifndef GIT_COMMIT\n" "# define GIT_COMMIT \"v" ,version "\"\n" "#endif\n")))) #t)) (add-before 'configure 'set-SHELL-variables ;; Set these environment variables so that 'tgl/configure' uses the ;; right shell and not /bin/sh. (lambda _ (let ((bash (which "bash"))) (setenv "SHELL" bash) (setenv "CONFIG_SHELL" bash) #t)))))) (synopsis "Telegram messaging support for Pidgin") (description "Telegram-purple is a plugin for Libpurple, the communication library used by the Pidgin instant messaging client, that adds support for the Telegram messenger.") ;; Code under tgl/ (the Telegram library) is LGPLv2.1+, but the plugin ;; itself is GPLv2+. (license license:gpl2+))) (define-public tdlib (let ((commit "278c7acdec83c5ac17d8e1ed0bb2cacbcea62460") (revision "0") (version "1.6.0")) (package (name "tdlib") (version (git-version version revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/tdlib/td.git") (commit commit))) (sha256 (base32 "0zlzpl6fgszg18kwycyyyrnkm255dvc6fkq0b0y32m5wvwwl36cv")) (file-name (git-file-name name version)))) (build-system cmake-build-system) (arguments `(#:tests? #t #:configure-flags (list "-DCMAKE_BUILD_TYPE=Release" "-DTD_ENABLE_LTO=OFF") ; FIXME: Get LTO to work. #:phases (modify-phases %standard-phases (add-after 'unpack 'remove-failing-tests (lambda _ (substitute* "test/CMakeLists.txt" ;; The test cases are compiled into a distinct binary ;; which uses mtproto.cpp to attempt to connect to ;; a remote server. Removing this file from the sources ;; list disables those specific test cases. (("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}/mtproto.cpp") "")) #t))))) (native-inputs `(("gperf" ,gperf) ("openssl" ,openssl) ("zlib" ,zlib) ("php" ,php) ("doxygen" ,doxygen))) (synopsis "Cross-platform library for building Telegram clients") (description "Tdlib is a cross-platform library for creating custom Telegram clients following the official Telegram API. It can be easily used from almost any programming language with a C-FFI and features first-class support for high performance Telegram Bot creation.") (home-page "https://core.telegram.org/tdlib") (license license:boost1.0)))) ;;; messaging.scm ends here