unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob dd1b9438a2487114387940b63a1273b9a92f0817 383648 bytes (raw)
name: gnu/packages/web.scm 	 # note: path name is non-authoritative(*)

   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
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
 
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Aljosha Papsch <misc@rpapsch.de>
;;; Copyright © 2014-2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015-2024 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Raoul Jean Pierre Bonnal <ilpuccio.febo@gmail.com>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015-2020, 2024 Eric Bavier <bavier@posteo.net>
;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org>
;;; Copyright © 2016-2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2016, 2023 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
;;; Copyright © 2016–2024 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2016–2022 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2016 Bake Timmons <b3timmons@speedymail.org>
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2017-2018, 2020-2023 Marius Bakke <marius@gnu.org>
;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2017 Petter <petter@mykolab.ch>
;;; Copyright © 2017, 2021 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2017, 2019, 2020 Christopher Baines <mail@cbaines.net>
;;; Copyright © 2018, 2019 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
;;; Copyright © 2018 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2019, 2020-2021, 2023 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2019 Brendan Tildesley <mail@brendan.scot>
;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com>
;;; Copyright © 2019, 2020 Florian Pelz <pelzflorian@pelzflorian.de>
;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2020, 2021, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2018, 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;; Copyright © 2020, 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
;;; Copyright © 2020, 2022 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020, 2021 Ryan Prior <rprior@protonmail.com>
;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@posteo.ro>
;;; Copyright © 2021, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2021 la snesne <lasnesne@lagunposprasihopre.org>
;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2021 Jack Hill <jackhill@jackhill.us>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021, 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2022 cage <cage-dev@twistfold.it>
;;; Copyright © 2022 Pradana Aumars <paumars@courrier.dev>
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; Copyright © 2023 Paul A. Patience <paul@apatience.com>
;;; Copyright © 2022 Bruno Victal <mirai@makinata.eu>
;;; Copyright © 2023 David Thompson <dthompson2@worcester.edu>
;;; Copyright © 2023 Christopher Howard <christopher@librehacker.com>
;;; Copyright © 2023 Felix Lechner <felix.lechner@lease-up.com>
;;; Copyright © 2023 Evgeny Pisemsky <mail@pisemsky.site>
;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
;;;
;;; 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 web)
  #:use-module (ice-9 match)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix gexp)
  #:use-module (guix cvs-download)
  #:use-module (guix hg-download)
  #:use-module (guix git-download)
  #:use-module (guix utils)
  #:use-module (guix build-system ant)
  #:use-module (guix build-system cargo)
  #:use-module (guix build-system cmake)
  #:use-module (guix build-system copy)
  #:use-module (guix build-system glib-or-gtk)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system go)
  #:use-module (guix build-system meson)
  #:use-module (guix build-system perl)
  #:use-module (guix build-system pyproject)
  #:use-module (guix build-system python)
  #:use-module (guix build-system scons)
  #:use-module (guix build-system trivial)
  #:use-module (gnu packages)
  #:use-module (gnu packages admin)
  #:use-module (gnu packages adns)
  #:use-module (gnu packages apr)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages base)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages bison)
  #:use-module (gnu packages bittorrent)
  #:use-module (gnu packages boost)
  #:use-module (gnu packages build-tools)
  #:use-module (gnu packages check)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages cpp)
  #:use-module (gnu packages crates-crypto)
  #:use-module (gnu packages crates-io)
  #:use-module (gnu packages crates-gtk)
  #:use-module (gnu packages crates-tls)
  #:use-module (gnu packages crates-web)
  #:use-module (gnu packages curl)
  #:use-module (gnu packages cyrus-sasl)
  #:use-module (gnu packages databases)
  #:use-module (gnu packages django)
  #:use-module (gnu packages docbook)
  #:use-module (gnu packages datastructures)
  #:use-module (gnu packages documentation)
  #:use-module (gnu packages emacs)
  #:use-module (gnu packages emacs-xyz)
  #:use-module (gnu packages flex)
  #:use-module (gnu packages fontutils)
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages gd)
  #:use-module (gnu packages geo)
  #:use-module (gnu packages gettext)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages gnome)
  #:use-module (gnu packages gnu-doc)
  #:use-module (gnu packages gnunet)
  #:use-module (gnu packages gnupg)
  #:use-module (gnu packages golang)
  #:use-module (gnu packages golang-build)
  #:use-module (gnu packages golang-check)
  #:use-module (gnu packages golang-compression)
  #:use-module (gnu packages golang-web)
  #:use-module (gnu packages golang-xyz)
  #:use-module (gnu packages gperf)
  #:use-module (gnu packages graphviz)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages guile)
  #:use-module (gnu packages guile-xyz)
  #:use-module (gnu packages icu4c)
  #:use-module (gnu packages image)
  #:use-module (gnu packages java)
  #:use-module (gnu packages jemalloc)
  #:use-module (gnu packages imagemagick)
  #:use-module (gnu packages kde)
  #:use-module (gnu packages kerberos)
  #:use-module (gnu packages libbsd)
  #:use-module (gnu packages libevent)
  #:use-module (gnu packages libidn)
  #:use-module (gnu packages libunistring)
  #:use-module (gnu packages libunwind)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages lisp-xyz)
  #:use-module (gnu packages lsof)
  #:use-module (gnu packages lua)
  #:use-module (gnu packages mail)
  #:use-module (gnu packages man)
  #:use-module (gnu packages markup)
  #:use-module (gnu packages ncurses)
  #:use-module (gnu packages networking)
  #:use-module (gnu packages node)
  #:use-module (gnu packages nss)
  #:use-module (gnu packages openldap)
  #:use-module (gnu packages openstack)
  #:use-module (gnu packages package-management)
  #:use-module (gnu packages pcre)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages perl-check)
  #:use-module (gnu packages perl-compression)
  #:use-module (gnu packages prometheus)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-build)
  #:use-module (gnu packages python-check)
  #:use-module (gnu packages python-crypto)
  #:use-module (gnu packages python-web)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages qt)
  #:use-module (gnu packages re2c)
  #:use-module (gnu packages readline)
  #:use-module (gnu packages sdl)
  #:use-module (gnu packages search)
  #:use-module (gnu packages serialization)
  #:use-module (gnu packages skribilo)
  #:use-module (gnu packages sphinx)
  #:use-module (gnu packages texinfo)
  #:use-module (gnu packages textutils)
  #:use-module (gnu packages time)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages valgrind)
  #:use-module (gnu packages version-control)
  #:use-module (gnu packages video)
  #:use-module (gnu packages vim)
  #:use-module (gnu packages wget)
  #:use-module (gnu packages xdisorg)
  #:use-module (gnu packages xml)
  #:use-module ((srfi srfi-1) #:select (delete-duplicates)))

(define-public qhttp
  (package
    (name "qhttp")
    (version "3.1")
    (source
     (origin
       (method git-fetch)
       (uri
        (git-reference
         (url "https://github.com/azadkuh/qhttp")
         (commit (string-append "version-" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0cx23g4y4k4v9p5ph6h7gfhp8sfy1gcdv1g6bl44hppar1y0zfdq"))))
    (build-system gnu-build-system)
    (arguments
     `(#:tests? #f                      ; no target
       #:imported-modules
       ((guix build copy-build-system)
        ,@%gnu-build-system-modules)
       #:modules
       (((guix build copy-build-system) #:prefix copy:)
        (guix build gnu-build-system)
        (guix build utils))
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch-source
           (lambda* (#:key outputs #:allow-other-keys)
             (substitute* "commondir.pri"
               (("\\$\\$PRJDIR/xbin")
                (string-append (assoc-ref outputs "out") "/lib"))
               (("-L")
                "-lhttp_parser -L")
               (("\\$\\$PRJDIR/3rdparty")
                ""))
             (substitute* "src/src.pro"
               (("SOURCES  \\+= \\$\\$PRJDIR/3rdparty/http-parser/http_parser.c")
                "")
               (("HEADERS  \\+= \\$\\$PRJDIR/3rdparty/http-parser/http_parser.h")
                ""))
             (substitute* '("src/private/qhttpbase.hpp" "src/qhttpabstracts.cpp")
               (("http-parser/http_parser.h")
                "http_parser.h"))
             #t))
         (replace 'configure
           (lambda _ (invoke "qmake")))
         (replace 'install
           (lambda args
             (apply (assoc-ref copy:%standard-phases 'install)
                    #:install-plan
                    '(("src" "include"
                       #:include-regexp ("\\.hpp$")))
                    args)))
         (add-after 'install 'remove-examples
           (lambda* (#:key outputs #:allow-other-keys)
             (with-directory-excursion
                 (string-append (assoc-ref outputs "out") "/lib")
               (for-each delete-file
                         (list
                          "basic-server"
                          "helloworld"
                          "postcollector")))
             #t)))))
    (inputs
     (list http-parser qtbase-5))
    (home-page "https://github.com/azadkuh/qhttp/")
    (synopsis "Qt-based HTTP Library")
    (description
     "Qhttp is a light-weight and asynchronous HTTP library
(both server & client) in Qt5 and C++14.")
    (license license:expat)))

(define-public httpd
  (package
    (name "httpd")
    (version "2.4.58")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://apache/httpd/httpd-"
                                 version ".tar.bz2"))
             (sha256
              (base32
               "1id45r2ccgkbjm9i998997ch32lvicpyynyx8x6aa4420wmdf5ps"))))
    (build-system gnu-build-system)
    (native-inputs (list `(,pcre "bin")))       ;for 'pcre-config'
    (inputs (list apr apr-util openssl perl)) ; needed to run bin/apxs
    (arguments
     `(#:test-target "test"
       #:configure-flags (list "--enable-rewrite"
                               "--enable-userdir"
                               "--enable-vhost-alias"
                               "--enable-ssl"
                               "--enable-mime-magic"
                               (string-append "--sysconfdir="
                                              (assoc-ref %outputs "out")
                                              "/etc/httpd"))))
    (synopsis "Featureful HTTP server")
    (description
     "The Apache HTTP Server Project is a collaborative software development
effort aimed at creating a robust, commercial-grade, featureful, and
freely-available source code implementation of an HTTP (Web) server.  The
project is jointly managed by a group of volunteers located around the world,
using the Internet and the Web to communicate, plan, and develop the server
and its related documentation.")
    (license license:asl2.0)
    (home-page "https://httpd.apache.org/")))

;; A package variant that may be out of date and vulnerable. Only for use in
;; test suites and should never be referred to by a built package.
(define-public httpd/pinned
  (hidden-package
    (package
      (inherit httpd)
      (version "2.4.52")
      (source (origin
               (method url-fetch)
               (uri (string-append "mirror://apache/httpd/httpd-"
                                   version ".tar.bz2"))
               (sha256
                (base32
                 "1jgmfbazc2n9dnl7axhahwppyq25bvbvwx0lqplq76by97fgf9q1")))))))

(define-public miniflux
  (package
    (name "miniflux")
    (version "2.1.4")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/miniflux/v2")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1m1rcxcjswni3adgjkn3hvb59cbfdh9cl22d5qqwn0lxs8mgqhfl"))))
    (build-system go-build-system)
    (arguments
     (list
      #:go go-1.22
      #:install-source? #f
      #:import-path "miniflux.app/v2"
      #:build-flags
      #~(list (string-append
               "-ldflags= -X miniflux.app/v2/internal/version.Version="
               #$version))
      #:phases
      #~(modify-phases %standard-phases
          ;; XXX: Replace when go-build-system supports nested path.
          (replace 'check
            (lambda* (#:key import-path tests? #:allow-other-keys)
              (when tests?
                (with-directory-excursion (string-append "src/" import-path)
                  (invoke "go" "test" "-v" "./...")))))
          (add-after 'install 'install-manpage
            (lambda* (#:key import-path #:allow-other-keys)
              (let ((man1 (string-append #$output "/share/man/man1/"))
                    (page (format #f "src/~a/miniflux.1" import-path)))
                (install-file page man1))))
          (add-after 'install-manpage 'rename-binary
            (lambda _
              (let ((bindir (string-append #$output "/bin/")))
                (rename-file (string-append bindir "v2")
                             (string-append bindir "miniflux"))))))))
    (inputs
     (list go-github-com-abadojack-whatlanggo
           go-github-com-andybalholm-brotli
           go-github-com-coreos-go-oidc-v3
           go-github-com-go-webauthn-webauthn
           go-github-com-gorilla-mux
           go-github-com-lib-pq
           go-github-com-prometheus-client-golang
           go-github-com-puerkitobio-goquery
           go-github-com-tdewolff-minify-v2
           go-github-com-yuin-goldmark
           go-golang-org-x-crypto
           go-golang-org-x-net
           go-golang-org-x-oauth2
           go-golang-org-x-term
           go-golang-org-x-text
           go-mvdan-cc-xurls))
    (home-page "https://miniflux.app/")
    (synopsis "Minimalist and opinionated feed reader")
    (description
     "Miniflux is a minimalist and opinionated feed reader:

@itemize
@item Written in Go (Golang)
@item Works only with Postgresql
@item Doesn't use any ORM
@item Doesn't use any complicated framework
@item Use only modern vanilla Javascript (ES6 and Fetch API)
@item Single binary compiled statically without dependency
@item The number of features is voluntarily limited
@end itemize")
    (license license:asl2.0)))

(define-public mod-wsgi
  (package
    (name "mod-wsgi")
    (version "4.9.4")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/GrahamDumpleton/mod_wsgi")
                    (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1zf921nd9xxdvvc8awzzfrljr0n29vi28mlam0jdwvsk0xv4gd7a"))))
    (build-system gnu-build-system)
    (arguments
     `(#:disallowed-references (,httpd)
       #:tests? #f                 ; TODO: can't figure out if there are tests
       #:make-flags (list
                     (string-append "DESTDIR="
                                    (assoc-ref %outputs "out"))
                     "LIBEXECDIR=/modules")))
    (native-inputs
     `(("httpd" ,httpd)))
    (inputs
     `(("python" ,python-wrapper)))
    (synopsis "Apache HTTPD module for Python WSGI applications")
    (description
     "The mod_wsgi module for the Apache HTTPD Server adds support for running
applications that support the Python @acronym{WSGI, Web Server Gateway
Interface} specification.")
    (license license:asl2.0)
    (home-page "https://modwsgi.readthedocs.io/")))

(define-public ablorb
  (package
    (name "ablorb")
    (version "0.1.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://gitlab.gnome.org/lilyp/ablorb")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1i705p2gw5aryj0myfj3rmsrmj3ilqdn5w7xd5dwjkyi80rc20kj"))))
    (build-system meson-build-system)
    (inputs (list glib gconf gnome-vfs libxml2))
    (native-inputs (list pkg-config))
    (home-page "https://gitlab.gnome.org/lilyp/ablorb")
    (synopsis "Replace asset links with data URIs")
    (description "Ablorb takes an XML file and resolves relative links,
replacing them with data URIs.")
    (license license:gpl3+)))

(define-public monolith
  (package
    (name "monolith")
    (version "2.8.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/Y2Z/monolith")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0xr63302yb5k9c2sihd1iy97j5c44d4jrzfaiwm81d9li577ih58"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs
       (("rust-atty" ,rust-atty-0.2)
        ("rust-base64" ,rust-base64-0.21)
        ("rust-chrono" ,rust-chrono-0.4)
        ("rust-clap" ,rust-clap-3)
        ("rust-cssparser" ,rust-cssparser-0.33)
        ("rust-encoding-rs" ,rust-encoding-rs-0.8)
        ("rust-html5ever" ,rust-html5ever-0.24)
        ("rust-percent-encoding" ,rust-percent-encoding-2)
        ("rust-regex" ,rust-regex-1)
        ("rust-reqwest" ,rust-reqwest-0.11)
        ("rust-sha2" ,rust-sha2-0.10)
        ("rust-url" ,rust-url-2))
       #:cargo-development-inputs
       (("rust-assert-cmd" ,rust-assert-cmd-2))))
    (native-inputs
     (list pkg-config))
    (inputs
     (list openssl))
    (home-page "https://github.com/Y2Z/monolith")
    (synopsis "Command line tool for saving web pages as a single HTML file")
    (description
     "Monolith bundles any web page into a single HTML file.

Unlike conventional ``Save page as…'', Monolith not only saves the target
document, it embeds CSS, image, and JavaScript assets all at once, producing
a single HTML5 document.

If compared to saving websites with @samp{wget -mpk}, Monolith embeds
all assets as data URLs and therefore displays the saved page exactly
the same, being completely separated from the Internet.")
    (license license:unlicense)))

(define-public nginx
  (package
    (name "nginx")
    ;; Please update the nginx-documentation package together with this one!
    ;; Track the ‘mainline’ branch.  Upstream considers it more reliable than
    ;; ’stable’ and recommends that “in general you deploy the NGINX mainline
    ;; branch at all times” (https://www.nginx.com/blog/nginx-1-6-1-7-released/)
    (version "1.27.0")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://nginx.org/download/nginx-"
                                  version ".tar.gz"))
              (sha256
               (base32
                "170ja338zh7wdyva34cr7f3wfq59434sssn51d5jvakyz0y0w8xp"))))
    (build-system gnu-build-system)
    (inputs (list libxml2 libxslt openssl pcre zlib))
    (arguments
     (list
      #:tests? #f                       ; no test target
      #:configure-flags
      #~(list "--with-http_ssl_module"
              "--with-http_v2_module"
              "--with-http_xslt_module"
              "--with-http_gzip_static_module"
              "--with-http_gunzip_module"
              "--with-http_addition_module"
              "--with-http_sub_module"
              "--with-pcre-jit"
              "--with-debug"
              "--with-compat"
              "--with-stream"
              "--with-stream_ssl_module"
              "--with-http_stub_status_module"
              ;; Even when not cross-building, we pass the
              ;; --crossbuild option to avoid customizing for the
              ;; kernel version on the build machine.
              #$(let ((system "Linux")  ; uname -s
                      (release "3.2.0") ; uname -r
                      ;; uname -m
                      (machine (match (or (%current-target-system)
                                          (%current-system))
                                 ("x86_64-linux"   "x86_64")
                                 ("i686-linux"     "i686")
                                 ("mips64el-linux" "mips64")
                                 ;; Prevent errors when querying
                                 ;; this package on unsupported
                                 ;; platforms, e.g. when running
                                 ;; "guix package --search="
                                 (_                "UNSUPPORTED"))))
                  (string-append "--crossbuild="
                                 system ":" release ":" machine)))
      #:phases
      #~(modify-phases %standard-phases
          (add-before 'configure 'patch-/bin/sh
            (lambda _
              (substitute* "auto/feature"
                (("/bin/sh") (which "sh")))))
          (replace 'configure
            ;; The configure script is hand-written, not from GNU autotools.
            (lambda* (#:key configure-flags inputs #:allow-other-keys)
              (setenv "CC" #$(cc-for-target))
              ;; Fix ./configure test for ‘#include <libxml/parser.h>’.
              (setenv "CFLAGS"          ; CPPFLAGS is not respected
                      (string-append "-O2 -g "
                                     "-I" (search-input-directory
                                           inputs "/include/libxml2")))
              (format #t "configure flags: ~s~%" configure-flags)
              (apply invoke "./configure"
                     (string-append "--prefix=" #$output)
                     configure-flags)))
          (add-after 'install 'install-man-page
            (lambda _
              (let ((man (string-append #$output "/share/man")))
                (install-file "objs/nginx.8" (string-append man "/man8")))))
          (add-after 'install 'fix-root-dirs
            (lambda _
              ;; 'make install' puts things in strange places, so we need to
              ;; clean it up ourselves.
              (let* ((out #$output)
                     (share (string-append out "/share/nginx")))
                ;; This directory is empty, so get rid of it.
                (rmdir (string-append out "/logs"))
                ;; Example configuration and HTML files belong in
                ;; /share.
                (mkdir-p share)
                (rename-file (string-append out "/conf")
                             (string-append share "/conf"))
                (rename-file (string-append out "/html")
                             (string-append share "/html"))))))))
    (home-page "https://nginx.org")
    (synopsis "HTTP and reverse proxy server")
    (description
     "Nginx (\"engine X\") is a high-performance web and reverse proxy server
created by Igor Sysoev.  It can be used both as a stand-alone web server
and as a proxy to reduce the load on back-end HTTP or mail servers.")
    ;; Almost all of nginx is distributed under the bsd-2 license.
    ;; The exceptions are:
    ;;   * The 'nginx-http-push' module is covered by the expat license.
    ;;   * The 'nginx-development-kit' module is mostly covered by bsd-3,
    ;;     except for two source files which are bsd-4 licensed.
    (license (list license:bsd-2 license:expat license:bsd-3 license:bsd-4))))

(define-public nginx-documentation
  ;; This documentation should be relevant for the current nginx package.
  (let ((version "1.27.0")
        (revision 3081)
        (changeset "1b23e39a3b94"))
    (package
      (name "nginx-documentation")
      (version (simple-format #f "~A-~A-~A" version revision changeset))
      (source
       (origin (method hg-fetch)
               (uri (hg-reference
                     (url "http://hg.nginx.org/nginx.org")
                     (changeset changeset)))
               (file-name (string-append name "-" version))
               (sha256
                (base32
                 "0xnfda8xh8mv00fsycqbwicm8bb7rsvdqmmwv0h372kiwxnazjkh"))))
      (build-system gnu-build-system)
      (arguments
       '(#:tests? #f                    ; no test suite
         #:phases
         (modify-phases %standard-phases
           (delete 'configure)          ; no configure script
           (replace 'build
             (lambda* (#:key outputs #:allow-other-keys)
               (let ((output (assoc-ref outputs "out")))
                 (substitute* "tools/umasked.sh"
                   ((" /bin/sh") (string-append " " (which "sh"))))
                 ;; The documentation includes a banner, which makes sense on
                 ;; the NGinx website, but doesn't make much sense when
                 ;; viewing locally. Therefore, modify the CSS to remove the
                 ;; banner.
                 (substitute* "xslt/style.xslt"
                   (("#banner           \\{ background:     black;")
                    "#banner           { display:        none;"))
                 (invoke "make")
                 #t)))
           (replace 'install
             (lambda* (#:key outputs #:allow-other-keys)
               (let ((output (assoc-ref outputs "out")))
                 (mkdir-p output)
                 (copy-recursively "libxslt" output)
                 #t))))))
      (native-inputs
       (list libxml2 libxslt nginx-xslscript))
      (home-page "https://nginx.org")
      (synopsis "Documentation for the nginx web server")
      (description
       "This package provides HTML documentation for the nginx web server.")
      (license license:bsd-2))))

(define-public nginx-accept-language-module
  ;; Upstream has never made a release; use current commit instead.
  (let ((commit "2f69842f83dac77f7d98b41a2b31b13b87aeaba7")
        (revision "1"))
    (package
      (name "nginx-accept-language-module")
      (version (git-version "0.0.0" ;upstream has no version number
                            revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/giom/nginx_accept_language_module")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1hjysrl15kh5233w7apq298cc2bp4q1z5mvaqcka9pdl90m0vhbw"))))
      (build-system gnu-build-system)
      (inputs `(("openssl" ,openssl)
                ("pcre" ,pcre)
                ("nginx-sources" ,(package-source nginx))
                ("zlib" ,zlib)))
      (arguments
       `(#:tests? #f                      ; no test target
         #:make-flags (list "modules")
         #:modules ((guix build utils)
                    (guix build gnu-build-system)
                    (ice-9 popen)
                    (ice-9 regex)
                    (ice-9 textual-ports))
         #:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'unpack-nginx-sources
             (lambda* (#:key inputs native-inputs #:allow-other-keys)
               (begin
                 ;; The nginx source code is part of the module’s source.
                 (format #t "decompressing nginx source code~%")
                 (let ((tar (assoc-ref inputs "tar"))
                       (nginx-srcs (assoc-ref inputs "nginx-sources")))
                   (invoke (string-append tar "/bin/tar")
                           "xvf" nginx-srcs "--strip-components=1"))
                 #t)))
           (add-after 'unpack 'convert-to-dynamic-module
             (lambda _
               (begin
                 (with-atomic-file-replacement "config"
                   (lambda (in out)
                     ;; cf. https://www.nginx.com/resources/wiki/extending/new_config/
                     (format out "ngx_module_type=HTTP~%")
                     (format out "ngx_module_name=\
ngx_http_accept_language_module~%")
                     (let* ((str (get-string-all in))
                            (rx (make-regexp
                                 "NGX_ADDON_SRCS=\"\\$NGX_ADDON_SRCS (.*)\""))
                            (m (regexp-exec rx str))
                            (srcs (match:substring m 1)))
                       (format out (string-append "ngx_module_srcs=\""
                                                  srcs "\"~%")))
                     (format out ". auto/module~%")
                     (format out "ngx_addon_name=$ngx_module_name~%"))))))
           (add-before 'configure 'patch-/bin/sh
             (lambda _
               (substitute* "auto/feature"
                 (("/bin/sh") (which "sh")))
               #t))
           (replace 'configure
             ;; This phase is largely copied from the nginx package.
             (lambda* (#:key outputs #:allow-other-keys)
               (let ((flags
                      (list ;; A copy of nginx’ flags follows, otherwise we
                            ;; get a binary compatibility error.  FIXME: Code
                            ;; duplication is bad.
                       (string-append "--prefix=" (assoc-ref outputs "out"))
                       "--with-http_ssl_module"
                       "--with-http_v2_module"
                       "--with-pcre-jit"
                       "--with-debug"
                       "--with-compat"
                       ;; Even when not cross-building, we pass the
                       ;; --crossbuild option to avoid customizing for the
                       ;; kernel version on the build machine.
                       ,(let ((system "Linux")    ; uname -s
                              (release "3.2.0")   ; uname -r
                              ;; uname -m
                              (machine (match (or (%current-target-system)
                                                  (%current-system))
                                         ("x86_64-linux"   "x86_64")
                                         ("i686-linux"     "i686")
                                         ("mips64el-linux" "mips64")
                                         ;; Prevent errors when querying
                                         ;; this package on unsupported
                                         ;; platforms, e.g. when running
                                         ;; "guix package --search="
                                         (_                "UNSUPPORTED"))))
                          (string-append "--crossbuild="
                                         system ":" release ":" machine))
                       ;; The following are the args decribed on
                       ;; <https://www.nginx.com/blog/compiling-dynamic-modules-nginx-plus>.
                       ;; Enabling --with-compat here and in the nginx package
                       ;; would ensure binary compatibility even when using
                       ;; different configure options from the main nginx
                       ;; package.  This is not needed for Guix.
                       ;; "--with-compat"
                       "--add-dynamic-module=.")))
                 (setenv "CC" "gcc")
                 (format #t "environment variable `CC' set to `gcc'~%")
                 (format #t "configure flags: ~s~%" flags)
                 (apply invoke "./configure" flags)
                 #t)))
           (replace 'install
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
                      (modules-dir (string-append out "/etc/nginx/modules"))
                      (doc-dir (string-append
                                out "/share/doc/nginx-accept-language-module")))
                 (mkdir-p modules-dir)
                 (copy-file "objs/ngx_http_accept_language_module.so"
                            (string-append
                             modules-dir "/ngx_http_accept_language_module.so"))
                 (mkdir-p doc-dir)
                 (copy-file "README.textile"
                            (string-append doc-dir "/README.textile"))
                 #t))))))
      (home-page
       "https://www.nginx.com/resources/wiki/modules/accept_language/")
      (synopsis "Nginx module for parsing the Accept-Language HTTP header")
      (description
       "This nginx module parses the Accept-Language field in HTTP headers and
chooses the most suitable locale for the user from the list of locales
supported at your website.")
      (license (delete-duplicates
                (cons license:bsd-2 ;license of nginx-accept-language-module
                      ;; The module’s code is linked statically with nginx,
                      ;; therefore nginx’ other licenses may also apply to its
                      ;; binary:
                      (package-license nginx)))))))

(define nginx-xslscript
  (let ((revision 11)
        (changeset "01dc9ba12e1b"))
    (package
      (name "nginx-xslscript")
      (version
       (simple-format #f "2014-03-31-~A-~A" revision changeset))
      (source (origin
                (method hg-fetch)
                (uri (hg-reference
                      (url "https://hg.nginx.org/xslscript")
                      (changeset changeset)))
                (file-name (string-append name "-" version))
                (sha256
                 (base32
                  "0am8zvdx3jmiwkg5q07qjaw5r26r4i2v5i4yr8a1k0jgib6ii08g"))))
      (build-system gnu-build-system)
      (arguments
       '(#:tests? #f  ; No test suite
         #:phases
         (modify-phases %standard-phases
           (delete 'configure)
           (delete 'build)
           (replace 'install
             (lambda* (#:key outputs #:allow-other-keys)
               (let ((out-bin (string-append
                               (assoc-ref outputs "out")
                               "/bin")))
                 (mkdir-p out-bin)
                 (copy-file "xslscript.pl"
                            (string-append
                             out-bin
                             "/xslscript.pl"))
                 #t))))))
      (home-page "https://hg.nginx.org/xslscript")
      (synopsis "XSLScript with NGinx specific modifications")
      (description
       "XSLScript is a terse notation for writing complex XSLT stylesheets.
This is modified version, specifically intended for use with the NGinx
documentation.")
      (license license:bsd-2))))

(define nginx-socket-cloexec
  (package
    (inherit nginx)
    (name "nginx-socket-cloexec") ;required for lua-resty-shell
    (source
     (origin
       (inherit (package-source nginx))
       (patches (append (search-patches "nginx-socket-cloexec.patch")
                        (origin-patches (package-source nginx))))))))

(define-public nginx-lua-module
  (package
    (inherit nginx)
    (name "nginx-lua-module")
    (version "0.10.16")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/openresty/lua-nginx-module")
             (commit (string-append "v" version))))
       (file-name (git-file-name "lua-nginx-module" version))
       (sha256
        (base32 "0nwcbqm1visg1dkxav7qa16w0d0n8cgqn4881xiqn88xfkxj0dyg"))))
    (build-system gnu-build-system)
    (inputs
     `(("nginx-sources" ,(package-source nginx-socket-cloexec))
       ("luajit" ,luajit)
       ,@(package-inputs nginx)))
    (arguments
     (substitute-keyword-arguments
         `(#:make-flags '("modules")
           #:modules ((guix build utils)
                      (guix build gnu-build-system)
                      (ice-9 popen)
                      (ice-9 regex)
                      (ice-9 textual-ports))
           ,@(package-arguments nginx)
           #:configure-flags '("--add-dynamic-module=."))
       ((#:phases phases)
        #~(modify-phases #$phases
            (add-after 'unpack 'unpack-nginx-sources
              (lambda* (#:key inputs native-inputs #:allow-other-keys)
                (begin
                  ;; The nginx source code is part of the module’s source.
                  (format #t "decompressing nginx source code~%")
                  (let ((tar (assoc-ref inputs "tar"))
                        (nginx-srcs (assoc-ref inputs "nginx-sources")))
                    (invoke (string-append tar "/bin/tar")
                            "xvf" nginx-srcs "--strip-components=1"))
                  #t)))
            (add-before 'configure 'set-luajit-env
              (lambda* (#:key inputs #:allow-other-keys)
                (let ((luajit (assoc-ref inputs "luajit")))
                  (setenv "LUAJIT_LIB"
                          (string-append luajit "/lib"))
                  (setenv "LUAJIT_INC"
                          (string-append luajit "/include/luajit-2.1"))
                  #t)))
            (replace 'install
              (lambda* (#:key outputs #:allow-other-keys)
                (let ((modules-dir (string-append (assoc-ref outputs "out")
                                                  "/etc/nginx/modules")))
                  (install-file "objs/ngx_http_lua_module.so" modules-dir)
                  #t)))
            (delete 'fix-root-dirs)
            (delete 'install-man-page)))))
    (synopsis "NGINX module for Lua programming language support")
    (description "This NGINX module provides a scripting support with Lua
programming language.")))

(define-public nginx-rtmp-module
  (package
    (inherit nginx)
    (name "nginx-rtmp-module")
    (version "1.2.2")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/arut/nginx-rtmp-module")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0y45bswk213yhkc2v1xca2rnsxrhx8v6azxz9pvi71vvxcggqv6h"))))
    (build-system gnu-build-system)
    (inputs
     `(("nginx-sources" ,(package-source nginx))
       ,@(package-inputs nginx)))
    (arguments
     (substitute-keyword-arguments
         `(#:make-flags '("modules") ;Only build this module not all of nginx.
           ,@(package-arguments nginx))
       ((#:configure-flags flags)
        #~(cons "--add-dynamic-module=." #$flags))
       ((#:phases phases)
        #~(modify-phases #$phases
            (add-after 'unpack 'unpack-nginx-sources
              (lambda _
                (begin
                  ;; The nginx source code is part of the module’s source.
                  (format #t "decompressing nginx source code~%")
                  (invoke "tar" "xvf" #$(this-package-input "nginx-sources")
                          ;; This package's LICENSE file would be
                          ;; overwritten with the one from nginx when
                          ;; unpacking the nginx source, so rename the nginx
                          ;; one when unpacking.
                          "--transform=s,/LICENSE$,/LICENSE.nginx,"
                          "--strip-components=1"))))
            (replace 'install
              (lambda _
                (let ((modules-dir (string-append #$output
                                                  "/etc/nginx/modules")))
                  (install-file "objs/ngx_rtmp_module.so" modules-dir))))
            (delete 'fix-root-dirs)
            (delete 'install-man-page)))))
    (home-page "https://github.com/arut/nginx-rtmp-module")
    (synopsis "NGINX module for audio and video streaming with RTMP")
    (description "This NGINX module provides streaming with the @acronym{RTMP,
Real-Time Messaging Protocol}, @acronym{DASH, Dynamic Adaptive Streaming over HTTP},
and @acronym{HLS, HTTP Live Streaming} protocols.  It allows NGINX to accept
incoming RTMP streams for recording or redistribution.  It also supports
on-demand streaming from a file on disk and pulling from an upstream RTMP
stream.  Remote control of the module is possible over HTTP.")
    (license license:bsd-2)))

(define-public nginx-module-vts
  (package
    (inherit nginx)
    (name "nginx-module-vts")
    (version "0.2.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/vozlt/nginx-module-vts")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "017298vpp1ra16xyfdbsczdrz0b0y67x6adkzcc98y6gb3kg52n7"))))
    (build-system gnu-build-system)
    (inputs
     `(("nginx-sources" ,(package-source nginx))
       ,@(package-inputs nginx)))
    (arguments
     (substitute-keyword-arguments
         `(#:make-flags '("modules") ;Only build this module not all of nginx.
           ,@(package-arguments nginx))
       ((#:configure-flags flags)
        #~(cons "--add-dynamic-module=." #$flags))
       ((#:phases phases)
        #~(modify-phases #$phases
            (add-after 'unpack 'unpack-nginx-sources
              (lambda _
                (begin
                  ;; The nginx source code is part of the module’s source.
                  (format #t "decompressing nginx source code~%")
                  (invoke "tar" "xvf" #$(this-package-input "nginx-sources")
                          ;; This package's LICENSE file would be
                          ;; overwritten with the one from nginx when
                          ;; unpacking the nginx source, so rename the nginx
                          ;; one when unpacking.
                          "--transform=s,/LICENSE$,/LICENSE.nginx,"
                          "--strip-components=1"))))
            (replace 'install
              (lambda _
                (let ((modules-dir (string-append #$output
                                                  "/etc/nginx/modules")))
                  (install-file "objs/ngx_http_vhost_traffic_status_module.so" modules-dir))))
            (delete 'fix-root-dirs)
            (delete 'install-man-page)))))
    (home-page "https://github.com/vozlt/nginx-module-vts")
    (synopsis "NGINX module for monitoring virtual host traffic status")
    (description "This NGINX module provides access to virtual host status information,
similar to live activity monitoring provided with NGINX plus.")
    (license license:bsd-2)))

(define-public lighttpd
  (package
    (name "lighttpd")
    (version "1.4.76")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://download.lighttpd.net/lighttpd/"
                                  "releases-" (version-major+minor version) ".x/"
                                  "lighttpd-" version ".tar.xz"))
              (sha256
               (base32
                "04ahiyn622mgpkib8j20vj7wa1av1dv7ing9vz7d1kvkwfb45gwc"))))
    (build-system gnu-build-system)
    (arguments
     (list #:configure-flags
           #~(list "--with-krb5"
                   "--with-ldap"
                   "--with-libev"
                   "--with-libunwind"
                   "--with-openssl"
                   "--with-pam"
                   "--with-sasl")
           #:phases
           #~(modify-phases %standard-phases
               (add-after 'unpack 'embed-/bin/sh-reference
                 (lambda* (#:key inputs #:allow-other-keys)
                   (substitute* "src/mod_ssi.c"
                     (("/bin/sh") (search-input-file inputs "/bin/sh")))))
               (add-after 'unpack 'fix-tests
                 (lambda _
                   (setenv "SHELL" (which "sh"))
                   ;; gethostbyaddr fails
                   (substitute* "tests/LightyTest.pm"
                     (("\\{HOSTNAME\\} = \\$name;")
                      "{HOSTNAME} = \"127.0.0.1\";"))))
               (add-after 'unpack 'skip-failing-tests
                 ;; XXX It would be wonderful if you, reader, felt suddenly and
                 ;; irresistibly compelled to investigate & fix these failures.
                 (lambda _
                   ;; Throws a bunch of ‘connect failed: Connection refused’.
                   (delete-file "tests/mod-scgi.t")

                   ;; test_mod_ssi_read_fd: Assertion `cq->first' failed.
                   (substitute* "src/t/test_mod.c"
                     ((".*\\btest_mod_ssi\\b.*") "")))))))
    (inputs
     (list bash-minimal
           cyrus-sasl
           libev
           libunwind
           linux-pam
           mit-krb5
           openldap
           openssl
           pcre2
           zlib))
    (native-inputs
     (list autoconf
           automake
           libtool
           perl ; for tests
           pkg-config which))
    (home-page "https://www.lighttpd.net/")
    (synopsis "Lightweight HTTP and reverse proxy server")
    (description
     "Lighttpd is a secure, fast, compliant, and very flexible web-server that
has been optimized for high-performance environments.  It has a very low
memory footprint compared to other webservers.  Its features include FastCGI,
CGI, authentication, output compression, URL rewriting and many more.")
    (license license:bsd-3)))

(define-public fcgi
  (package
    (name "fcgi")
    (version "2.4.2")
    (source
     (origin
       (method git-fetch)
       ;; Upstream has disappeared.
       (uri (git-reference
             (url "https://github.com/FastCGI-Archives/fcgi2")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1jhz6jfwv5kawa8kajvg18nfwc1b30f38zc0lggszd1vcmrwqkz1"))))
    (build-system gnu-build-system)
    ;; Parallel building is not supported.
    (arguments `(#:parallel-build? #f))
    (native-inputs
     (list autoconf automake libtool))
    ;; This is an archived fork of the original home page, www.fastcgi.com.
    (home-page "https://fastcgi-archives.github.io/")
    (synopsis "Language-independent, high-performant extension to CGI")
    (description "FastCGI is a language-independent, scalable extension to CGI
that provides high performance without the limitations of server specific
APIs.")
    ;; This package is released under the Open Market License, a variant of
    ;; the Expat license, incompatible with the GPL.
    (license (license:non-copyleft "file://LICENSE.TERMS"))))

(define-public fcgiwrap
  (let ((commit "2870d2729a3930988f0041e2d78fec672e69afac")
        (revision "1"))
    (package
      (name "fcgiwrap")
      (version (git-version "1.1.0" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               ;; Upstream last updated in 2015, this forked version has better
               ;; socket cleanup.
               (url "https://github.com/flu0r1ne/fcgiwrap")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0rkpp4apfhdcrmym3pcpqlncd0r4fyr3pa45i8g6x4p38b4azmmm"))))
      (build-system gnu-build-system)
      (arguments
       `(#:tests? #f                    ; no tests included
         #:make-flags (list "CC=gcc")
         #:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'fix-CFLAGS
             ;; Remove broken options unconditionally added to CFLAGS.
             (lambda _
               (substitute* "configure.ac"
                 ((" -Werror") ""))
               #t)))))
      (native-inputs
       (list autoconf automake pkg-config))
      (inputs
       (list fcgi))
      (home-page "https://nginx.localdomain.pl/wiki/FcgiWrap")
      (synopsis "Simple server for running CGI applications over FastCGI")
      (description "Fcgiwrap is a simple server for running CGI applications
over FastCGI.  It hopes to provide clean CGI support to Nginx (and other web
servers that may need it).")
      (license license:expat))))

(define-public starman
  (package
    (name "starman")
    (version "0.4015")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
                           "Starman-" version ".tar.gz"))
       (sha256
        (base32 "1y1kn4929k299fbf6sw9lxcsdlq9fvq777p6yrzk591rr9xhkx8h"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-libwww perl-module-build-tiny perl-test-requires))
    (propagated-inputs
     (list perl-data-dump
           perl-http-date
           perl-http-message
           perl-http-parser-xs
           perl-net-server
           perl-plack
           perl-test-tcp))
    (home-page "https://metacpan.org/release/Starman")
    (synopsis "PSGI/Plack web server")
    (description "Starman is a PSGI perl web server that has unique features
such as high performance, preforking, signal support, superdaemon awareness,
and UNIX socket support.")
    (license license:perl-license)))

(define-public icedtea-web
  (package
    (name "icedtea-web")
    (version "1.6.2")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "http://icedtea.wildebeest.org/download/source/"
                    name "-" version ".tar.gz"))
              (sha256
               (base32
                "004kwrngyxxlrlzby4vzxjr0xcyngcdc9dfgnvi61ffnjr006ryf"))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags
       (list  "--disable-plugin"         ;NPAPI plugins are obsolete nowadays.
              (string-append "BIN_BASH="
                             (search-input-file %build-inputs "/bin/bash"))
             (string-append "--with-jdk-home=" (assoc-ref %build-inputs "jdk")))))
    (outputs '("out" "doc"))
    (native-inputs
     (list pkg-config zip))
    (inputs
     `(("gtk+" ,gtk+)
       ("jdk" ,icedtea "jdk")))
    (home-page "http://icedtea.classpath.org/wiki/IcedTea-Web")
    (synopsis "Java Web Start")
    (description
     "IcedTea-Web is an implementation of the @dfn{Java Network Launching
Protocol}, also known as Java Web Start.  This package provides tools and
libraries for working with JNLP applets.")
    ;; The program is mainly GPL2+, with some individual files under LGPL2.1+
    ;; or dual licenses.
    (license license:gpl2+)))

(define-public jansson
  (package
    (name "jansson")
    (version "2.14")
    (source (origin
             (method url-fetch)
             (uri (string-append "https://github.com/akheron/jansson"
                                 "/releases/download/v" version
                                 "/jansson-" version ".tar.bz2"))
             (sha256
              (base32
               "1fdgji964mrrz19glx0zh91asji542fvybymvzk6rrbagkr5dagv"))))
    (build-system gnu-build-system)
    (arguments
     (list
      #:configure-flags #~'("--disable-static")
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'patch-tests
            (lambda _
              ;; Take a fix from upstream for testing with symbol versioning:
              ;; https://github.com/akheron/jansson/pull/593
              (substitute* "test/suites/api/check-exports"
                (("(grep ' \\[DT\\] ' \\$test_log/symbols.*) \\| sort" _ cmd)
                 (string-append cmd "| sed 's/@@libjansson.*//' | sort"))))))))
    (home-page "https://github.com/akheron/jansson")
    (synopsis "JSON C library")
    (description
     "Jansson is a C library for encoding, decoding and manipulating JSON
data.")
    (license license:expat)))

(define-public json-c
  (package
    (name "json-c")
    (version "0.15")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "https://s3.amazonaws.com/json-c_releases/releases/json-c-"
                   version ".tar.gz"))
             (sha256
              (base32
               "1im484iz08j3gmzpw07v16brwq46pxxj65i996kkp2vivcfhmn5q"))))
    (build-system cmake-build-system)
    (home-page "https://github.com/json-c/json-c/wiki")
    (synopsis "JSON implementation in C")
    (description
     "JSON-C implements a reference counting object model that allows you to
easily construct JSON objects in C, output them as JSON-formatted strings and
parse JSON-formatted strings back into the C representation of JSON objects.
It aims to conform to RFC 7159.")
    (license license:x11)))

;; TODO: Remove these old versions when all dependents have been updated.
(define-public json-c-0.13
  (package
    (inherit json-c)
    (version "0.13.1")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "https://s3.amazonaws.com/json-c_releases/releases/json-c-"
                   version ".tar.gz"))
             (sha256
              (base32 "0ws8dz9nk8q2c0gbf66kg2r6mrkl7kamd3gpdv9zsyrz9n6n0zmq"))
              (patches (search-patches "json-c-0.13-CVE-2020-12762.patch"))
             (modules '((guix build utils)))
             (snippet
              '(begin
                 ;; Somehow 'config.h.in' is older than
                 ;; 'aclocal.m4', which would trigger a rule to
                 ;; run 'autoheader'.
                 (set-file-time "config.h.in"
                                (stat "aclocal.m4"))
                 #t))))
    (build-system gnu-build-system)))

(define-public json-c-0.12
  (package
    (inherit json-c-0.13)
    (version "0.12.1")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "https://s3.amazonaws.com/json-c_releases/releases/json-c-"
                   version ".tar.gz"))
             (sha256
              (base32 "08qibrq29a5v7g23wi5icy6l4fbfw90h9ccps6vq0bcklx8n84ra"))
              (patches (search-patches "json-c-0.12-CVE-2020-12762.patch"))
             (modules '((guix build utils)))
             (snippet
              '(begin
                 ;; Somehow 'config.h.in' is older than
                 ;; 'aclocal.m4', which would trigger a rule to
                 ;; run 'autoheader'.
                 (set-file-time "config.h.in"
                                (stat "aclocal.m4"))

                 ;; Don't try to build with -Werror.
                 (substitute* (find-files "." "Makefile\\.in")
                   (("-Werror") ""))
                 #t))))))

(define-public json-parser
  (package
    (name "json-parser")
    (version "1.1.0")
    (source (origin
              ;; do not use auto-generated tarballs
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/udp/json-parser")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1ls7z4fx0sq633s5bc0j1gh36sv087gmrgr7rza22wjq2d4606yf"))))
    ;; FIXME: we should build the python bindings in a separate package
    (build-system gnu-build-system)
    ;; the tests are written for the python bindings which are not built here
    (arguments '(#:tests? #f))
    (home-page "https://github.com/udp/json-parser")
    (synopsis "JSON parser written in ANSI C")
    (description "This package provides a very low footprint JSON parser
written in portable ANSI C.

@itemize
@item BSD licensed with no dependencies (i.e. just drop the C file into your
project)
@item Never recurses or allocates more memory than it needs
@item Very simple API with operator sugar for C++
@end itemize")
    (license license:bsd-2)))

(define-public qjson
  (package
    (name "qjson")
    (version "0.9.0")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/flavio/qjson")
                    (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1f4wnxzx0qdmxzc7hqk28m0sva7z9p9xmxm6aifvjlp0ha6pmfxs"))))
    (build-system cmake-build-system)
    (arguments
     ;; The tests require a running X server.
     `(#:configure-flags '("-DQJSON_BUILD_TESTS=ON"
                           "-DCMAKE_CXX_FLAGS=-std=gnu++11 -fPIC")
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'disable-broken-test
           (lambda _
             ;; FIXME: One test fails.  See
             ;; https://github.com/flavio/qjson/issues/105
             (substitute* "tests/scanner/testscanner.cpp"
               (("QTest::newRow\\(\"too large exponential\"\\)" line)
                (string-append "//" line)))
             #t))
         (add-before 'check 'render-offscreen
           (lambda _ (setenv "QT_QPA_PLATFORM" "offscreen") #t)))))
    (inputs
     (list qtbase-5))
    (home-page "https://qjson.sourceforge.net")
    (synopsis "Library that maps JSON data to QVariant objects")
    (description "QJson is a Qt-based library that maps JSON data to
@code{QVariant} objects.  JSON arrays will be mapped to @code{QVariantList}
instances, while JSON's objects will be mapped to @code{QVariantMap}.")
    ;; Only version 2.1 of the license
    (license license:lgpl2.1)))

(define-public qoauth
  (package
    (name "qoauth")
    (version "2.0.0")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/ayoy/qoauth")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1b2jdqs526ac635yb2whm049spcsk7almnnr6r5b4yqhq922anw3"))))
    (build-system gnu-build-system)
    (inputs
     (list qca qtbase-5))
    (arguments
     '(#:tests? #f                      ;FIXME: some tests are failing
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch-code
           (lambda _
             (make-file-writable "src/qoauth.pc")
             (substitute* "src/src.pro"
               (("/lib64") "/lib"))
             #t))
         (add-after 'unpack 'adjust-mkspecs-directory
           (lambda* (#:key outputs #:allow-other-keys)
             (substitute* "src/src.pro"
               ;; Do not attempt to install the .prf file into qtbase
               ;; "lib/qt5/mkspecs/features", ref <https://bugs.gnu.org/45031>.
               (("\\$\\$\\[QMAKE_MKSPECS\\]")
                (string-append (assoc-ref outputs "out") "/lib/qt5/mkspecs")))
             #t))
         (replace 'configure
           (lambda* (#:key inputs #:allow-other-keys)
             (let ((qca (assoc-ref inputs "qca")))
               (invoke
                "qmake"
                (string-append "PREFIX=" (assoc-ref %outputs "out"))
                (string-append "QMAKE_INCDIR+=" qca "/include/Qca-qt5/QtCrypto")
                (string-append "LIBS+=-L" qca "/lib")
                (string-append "LIBS+=-lqca-qt5"))))))))
    (home-page "https://github.com/ayoy/qoauth")
    (synopsis "Qt-based C++ library for OAuth authorization scheme")
    (description "QOAuth is an attempt to support interaction with
OAuth-powered network services in a Qt way, i.e. simply, clearly and
efficiently.  It gives the application developer no more than 4 methods.")
    (license license:lgpl2.1+)))

(define-public krona-tools
  (package
   (name "krona-tools")
   (version "2.8")
   (source (origin
             (method url-fetch)
             (uri (string-append
                   "https://github.com/marbl/Krona/releases/download/v"
                   version "/KronaTools-" version ".tar"))
             (sha256
              (base32
               "1h698wddb3hii68mnkby7s1x81vbhd4z1sf4ivm1lsi2nqlc1vsn"))))
   (build-system perl-build-system)
   (arguments
     `(#:phases
       (modify-phases %standard-phases
         ;; There is no configure or build steps.
         (delete 'configure)
         (delete 'build)
         ;; Install script "install.pl" expects the build directory to remain
         ;; after installation, creating symlinks etc., so re-implement it
         ;; here.
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((bin   (string-append (assoc-ref outputs "out") "/bin"))
                   (perl  (string-append (assoc-ref outputs "out")
                                         "/lib/perl5/site_perl/krona-tools/lib"))
                   (share (string-append (assoc-ref outputs "out")
                                         "/share/krona-tools")))
               (mkdir-p bin)
               (for-each
                (lambda (script)
                  (let ((executable (string-append "scripts/" script ".pl")))
                    ;; Prefix executables with 'kt' as install script does.
                    (copy-file executable (string-append bin "/kt" script))))
                '("ClassifyBLAST"
                  "GetContigMagnitudes"
                  "GetLCA"
                  "GetTaxIDFromAcc"
                  "GetTaxInfo"
                  "ImportBLAST"
                  "ImportDiskUsage"
                  "ImportEC"
                  "ImportFCP"
                  "ImportGalaxy"
                  "ImportKrona"
                  "ImportMETAREP-BLAST"
                  "ImportMETAREP-EC"
                  "ImportMGRAST"
                  "ImportPhymmBL"
                  "ImportRDP"
                  "ImportRDPComparison"
                  "ImportTaxonomy"
                  "ImportText"
                  "ImportXML"))
               (for-each
                (lambda (directory)
                  (copy-recursively directory
                                    (string-append perl "/../" directory)))
                (list "data" "img" "taxonomy" "src"))
               (install-file "lib/KronaTools.pm" perl)

               ;; Install downloaders
               (substitute* "updateAccessions.sh"
                 (("ktPath=.*") (string-append "ktPath=" share "\n")))
               (substitute* "updateTaxonomy.sh"
                 (("ktPath=.*") (string-append "ktPath=" share "\n"))
                 (("command -v curl")
                  (string-append "command -v " (which "curl")))
                 (("curl -s")
                  (string-append (which "curl") " -s"))
                 (("curl\\$timestring")
                  (string-append (which "curl") "$timestring"))
                 (("perl -M")
                  (string-append (which "perl") " -M"))
                 (("make ")
                  (string-append (which "make") " ")))
               (for-each (lambda (file)
                           (install-file file (string-append share "/scripts")))
                         '("scripts/extractTaxonomy.pl"
                           "scripts/accession2taxid.make"
                           "scripts/taxonomy.make"))
               (for-each (lambda (file)
                           (install-file file share))
                         '("updateAccessions.sh"
                           "updateTaxonomy.sh")))))
         (add-after 'install 'wrap-program
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (path (getenv "PERL5LIB")))
               (for-each
                (lambda (executable)
                  (wrap-program executable
                    `("PERL5LIB" ":" prefix
                      (,(string-append out "/lib/perl5/site_perl/krona-tools/lib")))))
                (find-files (string-append out "/bin/") ".*")))))
         (delete 'check)
         (add-after 'wrap-program 'check
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (with-directory-excursion "data"
               (invoke (string-append (assoc-ref outputs "out") "/bin/ktImportText")
                       "ec.tsv")))))))
   (inputs
    (list curl gnu-make perl))
   (home-page "https://github.com/marbl/Krona/wiki")
   (synopsis "Hierarchical data exploration with zoomable HTML5 pie charts")
   (description
    "Krona is a flexible tool for exploring the relative proportions of
hierarchical data, such as metagenomic classifications, using a radial,
space-filling display.  It is implemented using HTML5 and JavaScript, allowing
charts to be explored locally or served over the Internet, requiring only a
current version of any major web browser.")
   (license license:bsd-3)))

(define-public rapidjson
  ;; Last release was in 2016, but this commit is from 2023.
  (let ((commit "949c771b03de448bdedea80c44a4a5f65284bfeb")
        (revision "1"))
    (package
      (name "rapidjson")
      (version (git-version "1.1.0" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/Tencent/rapidjson")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "1xlj0cj88ls3avwmlhd2gf5757fjpfbqx6qf49z1mzi381gcl72m"))
                (modules '((guix build utils)))
                (snippet
                 '(begin
                    ;; Remove code using the problematic JSON license (see
                    ;; <https://www.gnu.org/licenses/license-list.html#JSON>).
                    (delete-file-recursively "bin/jsonchecker")))))
      (build-system cmake-build-system)
      (arguments
       '(#:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'fix-march=native
             (lambda _
               (substitute* "CMakeLists.txt"
                 (("-m[^-]*=native") "")))))))
      (home-page "https://github.com/Tencent/rapidjson")
      (synopsis "JSON parser/generator for C++ with both SAX/DOM style API")
      (description
       "RapidJSON is a fast JSON parser/generator for C++ with both SAX/DOM
style API.")
      (license license:expat))))

(define-public libjwt
  (package
    (name "libjwt")
    (version "1.17.2")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://github.com/benmcollins/libjwt/releases/download/v"
                           version "/libjwt-"
                           version ".tar.bz2"))
       (sha256
        (base32
         "1bpfaa0y8bccz5hr677lkrprs07akx02k0qbf82z2c8syr24a77i"))))
    (build-system gnu-build-system)
    (inputs
     (list jansson openssl))
    (native-inputs
     (list check pkg-config))
    (home-page "https://github.com/benmcollins/libjwt")
    (synopsis "C @acronym{JWT, JSON Web Token} library")
    (description "@code{libjwt} is a @acronym{JWT, JSON Web Token} library for
C.")
    (license license:mpl2.0)))

(define-public yajl
  (package
    (name "yajl")
    (version "2.1.0")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/lloyd/yajl")
                    (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "00yj06drb6izcxfxfqlhimlrb089kka0w0x8k27pyzyiq7qzcvml"))))
    (build-system cmake-build-system)
    (arguments
     '(#:phases
       (modify-phases %standard-phases
         (add-after 'patch-source-shebangs 'patch-tests
           (lambda _
             (substitute* "test/parsing/run_tests.sh"
               (("`which echo`") (which "echo"))))))))
    (home-page "https://lloyd.github.io/yajl/")
    (synopsis "C library for parsing and generating JSON")
    (description
     "@acronym{YAJL, Yet Another JSON Library} is a small event-driven
(SAX-style) JSON parser and validating generator written in ANSI C.")
    (license license:isc)))

(define-public libyajl
  (deprecated-package "libyajl" yajl))

(define-public libwebsockets
  (package
    (name "libwebsockets")
    (version "4.3.2")
    (source (origin
              ;; The project does not publish tarballs, so we have to take
              ;; things from Git.
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/warmcat/libwebsockets")
                    (commit (string-append "v" version))))
              (sha256
               (base32
                "0rxgb05f6jignb0y367rs88cla2s1ndd9jfl4ms77q8w0wnbq762"))
              (file-name (git-file-name name version))))
    (build-system cmake-build-system)
    (native-inputs (list perl))             ; to build the HTML doc
    (inputs (list zlib openssl))
    (synopsis "WebSockets library written in C")
    (description
     "Libwebsockets is a library that allows C programs to establish client
and server WebSockets connections---a protocol layered above HTTP that allows
for efficient socket-like bidirectional reliable communication channels.")
    (home-page "https://libwebsockets.org")
    (license license:expat)))

(define-public wabt
  (package
    (name "wabt")
    (version "1.0.34")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/WebAssembly/wabt")
             (commit version)
             (recursive? #true)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1vxvc34b7a7lkrmzdb5cjv0b54vhiyr33sy0i2ps5jrmg5rqqmia"))
       (modules '((guix build utils)))
       (snippet
        '(delete-file-recursively "third_party/gtest/"))))
    (build-system cmake-build-system)
    (arguments
     (list
      ;; Tests on non-x86_64 architectures are not well supported upstream.
      #:tests? (target-x86-64?)
      #:test-target "run-tests"
      #:configure-flags '(list "-DUSE_SYSTEM_GTEST=ON")
      #:phases
      '(modify-phases %standard-phases
         (add-after 'unpack 'use-gcc
           (lambda _ (setenv "CC" "gcc")))
         ;; XXX This is the only test that fails.
         (add-after 'unpack 'delete-broken-test
           (lambda _
             (delete-file "test/wasm2c/spec/memory_init.txt"))))))
    (native-inputs (list python googletest))
    (home-page "https://github.com/WebAssembly/wabt")
    (synopsis "WebAssembly Binary Toolkit")
    (description "WABT (pronounced: wabbit) is a suite of tools for
WebAssembly, including:

@enumerate
@item @command{wat2wasm} translates from WebAssembly text format to the
WebAssembly binary format
@item @command{wasm2wat} is the inverse; it translates from the binary format
back to the text format (also known as a .wat)
@item @command{wasm-objdump} prints information about a wasm binary, similarly
to @command{objdump}.
@item @command{wasm-interp} decodes ands run a WebAssembly binary file using a
stack-based interpreter
@item @command{wat-desugar} parses .wat text form as supported by the spec
interpreter (s-expressions, flat syntax, or mixed) and prints the canonical
flat format
@item @command{wasm2c} converts a WebAssembly binary file to a C source and
header file.
@end enumerate

These tools are intended for use in (or for development of) toolchains or
other systems that want to manipulate WebAssembly files.")
    (license license:asl2.0)))

(define-public wasm3
  (package
    (name "wasm3")
    (version "0.5.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/wasm3/wasm3")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "07zzmk776j8ydyxhrnnjiscbhhmz182a62r6aix6kfk5kq2cwia2"))))
    (build-system cmake-build-system)
    (arguments
     ;; The default WASI option "uvwasi" causes CMake to initiate a 'git
     ;; clone' which cannot happen within the build container.
     '(#:configure-flags '("-DBUILD_WASI=simple")
       ;; No check target.  There are tests but they require a network
       ;; connection to download the WebAssembly core test suite.
       #:tests? #f
       ;; There is no install target.  Instead, we have to manually copy the
       ;; wasm3 build artifacts to the output directory.
       #:phases
       (modify-phases %standard-phases
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (bindir (string-append out "/bin"))
                    (includedir (string-append out "/include"))
                    (libdir (string-append out "/lib")))
               (mkdir-p bindir)
               (mkdir-p includedir)
               (mkdir-p libdir)
               (copy-file "wasm3" (string-append bindir "/wasm3"))
               (for-each (lambda (header)
                           (copy-file header
                                      (string-append includedir "/"
                                                     (basename header))))
                         (find-files "../source/source" "\\.h$"))
               (copy-file "source/libm3.a"
                          (string-append libdir "/libm3.a"))))))))
    (home-page "https://github.com/wasm3/wasm3")
    (synopsis "WebAssembly interpreter")
    (description "WASM3 is a fast WebAssembly interpreter.")
    (license license:expat)))

(define-public wasm-micro-runtime
  (package
    (name "wasm-micro-runtime")
    (version "1.2.3")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/bytecodealliance/wasm-micro-runtime")
                    (commit (string-append "WAMR-" version))))
              (file-name (git-file-name "WAMR" version))
              (sha256
               (base32
                "1s7r8vfxixf737jp12cf7as68fd63lrmqdxj7fiqdla2wk89ly3f"))))
    (build-system cmake-build-system)
    (arguments
     (list
      ;; Running the tests is difficult.  The test script in
      ;; tests/wamr-test-suites insists on downloading and building wabt (even
      ;; if we provide it) and it has a hard time accepting a separately
      ;; provided clone of the https://github.com/WebAssembly/spec repository.
      ;; Future releases provide unit tests which may be easier to run.
      #:tests? #false
      #:phases
      '(modify-phases %standard-phases
         (add-after 'unpack 'chdir
           (lambda _
             (chdir "product-mini/platforms/linux"))))))
    (home-page "https://bytecodealliance.github.io/wamr.dev")
    (synopsis "WebAssembly Micro Runtime")
    (description "WebAssembly Micro Runtime (WAMR) is a lightweight standalone
WebAssembly (Wasm) runtime with small footprint, high performance and highly
configurable features for applications cross from embedded, IoT, edge to
Trusted Execution Environment (TEE), smart contract, cloud native and other
features.")
    (license license:asl2.0)))

(define-public websocketpp
  (package
    (name "websocketpp")
    (version "0.8.2")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/zaphoyd/websocketpp")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1ww4fhl8qf12hkv6jaild8zzsygdspxm1gqpk2f63gv1xfi31wpm"))
       (patches (search-patches "websocketpp-fix-for-cmake-3.15.patch"))))
    (build-system cmake-build-system)
    (inputs (list boost openssl))
    (arguments '(#:configure-flags '("-DBUILD_TESTS=ON")
                 #:phases
                 (modify-phases %standard-phases
                   (add-after 'install 'remove-tests
                     (lambda* (#:key outputs #:allow-other-keys)
                       (let* ((install-dir (assoc-ref outputs "out"))
                              (bin-dir (string-append install-dir "/bin")))
                         (delete-file-recursively bin-dir)
                         #t))))))
    (home-page "https://www.zaphoyd.com/websocketpp/")
    (synopsis "C++ library implementing the WebSocket protocol")
    (description "WebSocket++ is a C++ library that can be used to implement
WebSocket functionality.  The goals of the project are to provide a WebSocket
implementation that is simple, portable, flexible, lightweight, low level, and
high performance.")
    (license license:bsd-3)))

(define-public wslay
  (package
    (name "wslay")
    (version "1.1.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/tatsuhiro-t/wslay")
             (commit (string-append "release-" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1w32iljg4inqf0712w5fxxhggvmjh6ipl2lnz0h36dv1xrj0d964"))))
    (build-system gnu-build-system)
    (arguments
     ;; Parallel builds don't reliably succeed.
     `(#:parallel-build? #f
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'fix-sphinx-error
           ;; XXX: Remove in next version: fix applied upstream.  See
           ;; <https://github.com/tatsuhiro-t/wslay/commit/43fda1207ea5977043630500e0c8e77b98b35320>.
           (lambda _
             (substitute* "doc/sphinx/conf.py.in"
               (("add_stylesheet") "add_css_file")))))))
    (native-inputs
     (list autoconf
           automake
           cunit ; for tests
           libtool
           pkg-config
           python-sphinx))
    (home-page "https://tatsuhiro-t.github.io/wslay/")
    (synopsis "C WebSocket library")
    (description "@code{Wslay} is an event-based C library for the WebSocket
protocol version 13, described in RFC 6455.  Besides a high-level API it
provides callbacks for sending and receiving frames directly.  @code{Wslay}
only supports the data transfer part of WebSocket protocol and does not
perform the opening handshake in HTTP.")
    (license license:expat)))

(define-public libpsl
  (package
    (name "libpsl")
    (version "0.21.1")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/rockdaboot/libpsl/"
                                  "releases/download/" version
                                  "/libpsl-" version ".tar.gz"))
              (sha256
               (base32
                "0k0d46bbh1jj2ll369f134vciplrzbqkg7fv9m62bl6lzghy2v5c"))))
    (build-system gnu-build-system)
    (native-inputs
     `(("pkg-config" ,pkg-config)

       ;; For tests.
       ("python" ,python-wrapper)))
    (inputs
     (list libidn2 libunistring))
    (home-page "https://github.com/rockdaboot/libpsl")
    (synopsis "C library for the Publix Suffix List")
    (description
     "A \"public suffix\" is a domain name under which Internet users can
directly register own names.

Browsers and other web clients can use it to avoid privacy-leaking
\"supercookies\", avoid privacy-leaking \"super domain\" certificates, domain
highlighting parts of the domain in a user interface, and sorting domain lists
by site.

Libpsl has built-in PSL data for fast access, allowing to load PSL data from
files, checks if a given domain is a public suffix, provides immediate cookie
domain verification, finds the longest public part of a given domain, finds
the shortest private part of a given domain, works with international
domains (UTF-8 and IDNA2008 Punycode), is thread-safe, and handles IDNA2008
UTS#46.")
    (license license:x11)))

(define-public esbuild
  (package
    (name "esbuild")
    (version "0.14.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/evanw/esbuild")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "09r1xy0kk6c9cpz6q0mxr4why373pwxbm439z2ihq3k1d5kk7x4w"))
       (modules '((guix build utils)))
       (snippet
        '(begin
           ;; Remove prebuilt binaries
           (delete-file-recursively "npm")
           #t))))
    (build-system go-build-system)
    (arguments
     `(#:import-path "github.com/evanw/esbuild/cmd/esbuild"
       #:unpack-path "github.com/evanw/esbuild"
       #:phases
       (modify-phases %standard-phases
         (replace 'check
           (lambda* (#:key tests? unpack-path #:allow-other-keys)
             (when tests?
               ;; The "Go Race Detector" is only supported on 64-bit
               ;; platforms, this variable disables it.
               ;; TODO: Causes too many rebuilds, rewrite to limit to x86_64,
               ;; aarch64 and ppc64le.
               ,(if (target-riscv64?)
                  `(setenv "ESBUILD_RACE" "")
                  `(unless ,(target-64bit?)
                     (setenv "ESBUILD_RACE" "")))
               (with-directory-excursion (string-append "src/" unpack-path)
                 (invoke "make" "test-go")))
             #t)))))
    (inputs
     `(("golang.org/x/sys" ,go-golang-org-x-sys)))
    (native-inputs
     `(("github.com/kylelemons/godebug" ,go-github-com-kylelemons-godebug)))
    (home-page "https://esbuild.github.io/")
    (synopsis "Bundler and minifier tool for JavaScript and TypeScript")
    (description
     "The esbuild tool provides a unified bundler, transpiler and
minifier.  It packages up JavaScript and TypeScript code, along with JSON
and other data, for distribution on the web.")
    (license license:expat)))

(define-public tinyproxy
  (package
    (name "tinyproxy")
    (version "1.11.1")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/tinyproxy/tinyproxy/"
                                  "releases/download/" version "/tinyproxy-"
                                  version ".tar.xz"))
              (sha256
               (base32
                "0z0gnk74y68fv34vlgn2mf0zp1h3s27dbz8a1nwsxl0mh928hqyn"))))
    (build-system gnu-build-system)
    (arguments
     `(#:test-target "test"             ; ‘make check’ silently does nothing
       #:configure-flags
       (list
        ;; For the log file, etc.
        "--localstatedir=/var")
       #:phases
       (modify-phases %standard-phases
         (add-before 'build 'pre-build
           (lambda* (#:key inputs #:allow-other-keys #:rest args)
             ;; Uncommenting the next two lines may assist in debugging
             ;; (substitute* "docs/man5/Makefile" (("a2x") "a2x -v"))
             ;; (setenv "XML_DEBUG_CATALOG" "1")
             #t)))))
    (native-inputs
     (list perl))                 ; for tests
    (home-page "https://tinyproxy.github.io/")
    (synopsis "Light-weight HTTP/HTTPS proxy daemon")
    (description "Tinyproxy is a light-weight HTTP/HTTPS proxy
daemon.  Designed from the ground up to be fast and yet small, it is an ideal
solution for use cases such as embedded deployments where a full featured HTTP
proxy is required, but the system resources for a larger proxy are
unavailable.")
    (license license:gpl2+)))

(define-public polipo
  (package
    (name "polipo")
    (version "1.1.1")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "http://www.pps.univ-paris-diderot.fr/~jch/software/files/polipo/polipo-"
             version ".tar.gz"))
       (sha256
        (base32
         "05g09sg9qkkhnc2mxldm1w1xkxzs2ylybkjzs28w8ydbjc3pand2"))))
    (native-inputs (list texinfo))
    (build-system gnu-build-system)
    (arguments
     `(#:phases (modify-phases %standard-phases
                  (delete 'configure))
       #:make-flags (let ((out (assoc-ref %outputs "out")))
                      (list (string-append "PREFIX=" out)
                            (string-append "LOCAL_ROOT="
                                           out "/share/polipo/www")
                            "CC=gcc"))
       ;; No 'check' target.
       #:tests? #f))
    (home-page "https://www.pps.univ-paris-diderot.fr/~jch/software/polipo/")
    (synopsis "Small caching web proxy")
    (description
     "Polipo is a small caching web proxy (web cache, HTTP proxy, and proxy
server).  It was primarily designed to be used by one person or a small group
of people.")
    (license license:expat)))

(define-public websockify
  (package
    (name "websockify")
    (version "0.11.0")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/novnc/websockify")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0ysqylpyv17s52634wn3vrwf7y9b5ig7fdfv8vwj1272lvv68qgk"))))
    (build-system pyproject-build-system)
    (native-inputs (list python-nose2))
    (inputs
     (list python-jwcrypto
           python-numpy
           python-redis
           python-requests
           ;; TODO: Remove simplejson for versions > 0.11.0.
           python-simplejson))
    (home-page "https://github.com/novnc/websockify")
    (synopsis "WebSockets support for any application/server")
    (description "Websockify translates WebSockets traffic to normal socket
traffic.  Websockify accepts the WebSockets handshake, parses it, and then
begins forwarding traffic between the client and the target in both
directions.")
    (license license:lgpl3)))

;; This is a variant of esbuild that builds and installs the nodejs API.
;; Eventually, this should probably be merged with the esbuild package.
(define-public esbuild-node
  (package
    (inherit esbuild)
    (name "esbuild-node")
    (version (package-version esbuild))
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/evanw/esbuild")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "09r1xy0kk6c9cpz6q0mxr4why373pwxbm439z2ihq3k1d5kk7x4w"))
       (modules '((guix build utils)))
       (snippet
        ;; Remove prebuilt binaries
        '(delete-file-recursively "lib/npm/exit0"))))
    (arguments
     (list
      #:import-path "github.com/evanw/esbuild/cmd/esbuild"
      #:unpack-path "github.com/evanw/esbuild"
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'build 'build-platform
            (lambda* (#:key unpack-path #:allow-other-keys)
              (with-directory-excursion (string-append "src/" unpack-path)
                ;; We're using Node 10, which doesn't have this method.
                (substitute* "scripts/esbuild.js"
                  (("exports.buildNativeLib" m)
                   (string-append
                    "Object.fromEntries = entries => entries.reduce((result, entry) => (result[entry[0]] = entry[1], result), {});\n"
                    m)))
                ;; Must be writable.
                (for-each make-file-writable (find-files "." "."))
                (invoke "node" "scripts/esbuild.js"
                        (string-append #$output "/bin/esbuild"))
                (let ((modules (string-append #$output "/lib/node_modules/esbuild")))
                  (mkdir-p modules)
                  (copy-recursively "npm/esbuild" modules)))))
          (replace 'check
            (lambda* (#:key tests? unpack-path #:allow-other-keys)
              (when tests?
                ;; The "Go Race Detector" is only supported on 64-bit
                ;; platforms, this variable disables it.
                ;; TODO: Causes too many rebuilds, rewrite to limit to x86_64,
                ;; aarch64 and ppc64le.
                #$(if (target-riscv64?)
                      `(setenv "ESBUILD_RACE" "")
                      #~(unless #$(target-64bit?)
                          (setenv "ESBUILD_RACE" "")))
                (with-directory-excursion (string-append "src/" unpack-path)
                  (invoke "make" "test-go"))))))))
    (native-inputs
     (modify-inputs (package-native-inputs esbuild)
       (append node)))))

(define-public wwwoffle
  (package
    (name "wwwoffle")
    (version "2.9j")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://www.gedanken.org.uk/software/"
                                  "wwwoffle/download/wwwoffle-"
                                  version ".tgz"))
              (sha256
               (base32
                "1ihil1xq9dp21hf108khxbw6f3baq0w5c0j3af038y6lkmad4vdi"))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags '("--with-gnutls")
       #:tests? #f))                         ; no test target
    (native-inputs (list flex))
    (inputs `(("gnutls" ,gnutls)
              ("libcrypt" ,libgcrypt)))
    (home-page "https://www.gedanken.org.uk/software/wwwoffle/")
    (synopsis "Caching web proxy optimized for intermittent internet links")
    (description "WWWOFFLE is a proxy web server that is especially good for
intermittent internet links.  It can cache HTTP, HTTPS, FTP, and finger
protocols, and supports browsing and requesting pages while offline, indexing,
modifying pages and incoming and outgoing headers, monitoring pages for
changes, and much more.")
    (license license:gpl2+)))

(define-public liboauth
  (package
    (name "liboauth")
    (version "1.0.3")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://sourceforge/liboauth/liboauth-"
                                  version ".tar.gz"))
              (sha256
               (base32
                "07w1aq8y8wld43wmbk2q8134p3bfkp2vma78mmsfgw2jn1bh3xhd"))))
    (build-system gnu-build-system)
    (arguments '(#:configure-flags '("--enable-nss")))
    (native-inputs (list pkg-config))
    (propagated-inputs
     (list curl nss))
    (home-page "https://sourceforge.net/projects/liboauth")
    (synopsis "C library implementing the OAuth API")
    (description
     "liboauth is a collection of C functions implementing the OAuth API.
liboauth provides functions to escape and encode strings according to OAuth
specifications and offers high-level functionality built on top to sign
requests or verify signatures using either NSS or OpenSSL for calculating the
hash/signatures.")
    ;; Source code may be distributed under either license.
    (license (list license:expat license:gpl2+))))

(define-public libquvi-scripts
  (package
    (name "libquvi-scripts")
    (version "0.4.21")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "mirror://sourceforge/quvi/" (version-major+minor version) "/"
             name "/" name "-" version ".tar.xz"))
       (sha256
        (base32 "0d0giry6bb57pnidymvdl7i5x9bq3ljk3g4bs294hcr5mj3cq0kw"))))
    (build-system gnu-build-system)
    (home-page "https://quvi.sourceforge.net/")
    (synopsis "Media stream URL parser")
    (description "This package contains support scripts called by libquvi to
parse media stream properties.")
    (license license:lgpl2.1+)))

(define-public libquvi
  (package
    (name "libquvi")
    (version "0.4.1")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "mirror://sourceforge/quvi/" (version-major+minor version) "/" name "/"
             name "-" version ".tar.xz"))
       (sha256
        (base32 "00x9gbmzc5cns0gnfag0hsphcr3cb33vbbb9s7ppvvd6bxz2z1mm"))))
    (build-system gnu-build-system)
    (native-inputs (list pkg-config))
    (inputs
     (list curl
           cyrus-sasl
           libquvi-scripts
           lua-5.1
           openssl
           zlib))
    (arguments
     ;; Lua provides no .pc file, so add CFLAGS/LIBS manually.
     '(#:configure-flags
       (let ((lua (assoc-ref %build-inputs "lua")))
         (list
          (string-append "liblua_CFLAGS=-I" lua "/include")
          (string-append "liblua_LIBS=-L" lua "/libs -llua")))))
    (home-page "https://quvi.sourceforge.net/")
    (synopsis "Media stream URL parser")
    (description "libquvi is a library with a C API for parsing media stream
URLs and extracting their actual media files.")
    (license license:lgpl2.1+)))

(define-public quvi
  (package
    (name "quvi")
    (version "0.4.2")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "mirror://sourceforge/" name "/"  (version-major+minor version)
             "/" name "/" name "-" version ".tar.xz"))
       (sha256
        (base32 "09lhl6dv5zpryasx7yjslfrcdcqlsbwapvd5lg7w6sm5x5n3k8ci"))))
    (build-system gnu-build-system)
    (native-inputs (list pkg-config))
    (inputs
     (list curl libquvi))
    (home-page "https://quvi.sourceforge.net/")
    (synopsis "Media stream URL parser")
    (description "quvi is a command-line-tool suite to extract media files
from streaming URLs.  It is a command-line wrapper for the libquvi library.")
    (license license:lgpl2.1+)))

(define-public serf
  (package
    (name "serf")
    (version "1.3.9")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://apache/serf/serf-"
                           version ".tar.bz2"))
       (patches (search-patches "serf-python3.patch"))
       (sha256
        (base32 "1k47gbgpp52049andr28y28nbwh9m36bbb0g8p0aka3pqlhjv72l"))))
    (build-system scons-build-system)
    (propagated-inputs
     (list apr apr-util openssl-1.1))
    (inputs
     (list ;; TODO: Fix build with gss.
           ;;("gss" ,gss)
           zlib))
    (arguments
     `(#:scons-flags (list (string-append "APR=" (assoc-ref %build-inputs "apr"))
                           (string-append "APU=" (assoc-ref %build-inputs "apr-util"))
                           (string-append "OPENSSL=" (assoc-ref %build-inputs "openssl"))
                           ;; (string-append "GSSAPI=" (assoc-ref %build-inputs "gss"))
                           (string-append "ZLIB=" (assoc-ref %build-inputs "zlib"))
                           (string-append "PREFIX=" %output))
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'scons-propagate-environment
                    (lambda _
                      ;; By design, SCons does not, by default, propagate
                      ;; environment variables to subprocesses.  See:
                      ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
                      ;; Here, we modify the SConstruct file to arrange for
                      ;; environment variables to be propagated.
                      (substitute* "SConstruct"
                        (("^env = Environment\\(")
                         "env = Environment(ENV=os.environ, "))))
         (add-before 'check 'disable-broken-tests
           (lambda _
             ;; These tests rely on SSL certificates that expired 2017-04-18.
             ;; While there are newer certs available upstream, we don't want
             ;; this package to suddenly "expire" some time in the future.
             ;; https://bugs.gnu.org/26671
             (let ((broken-tests
                    '("test_ssl_trust_rootca"
                      "test_ssl_certificate_chain_with_anchor"
                      "test_ssl_certificate_chain_all_from_server"
                      "test_ssl_no_servercert_callback_allok"
                      "test_ssl_large_response"
                      "test_ssl_large_request"
                      "test_ssl_client_certificate"
                      "test_ssl_future_server_cert"
                      "test_setup_ssltunnel"
                      "test_ssltunnel_basic_auth"
                      "test_ssltunnel_basic_auth_server_has_keepalive_off"
                      "test_ssltunnel_basic_auth_proxy_has_keepalive_off"
                      "test_ssltunnel_basic_auth_proxy_close_conn_on_200resp"
                      "test_ssltunnel_digest_auth")))
               (for-each
                (lambda (test)
                  (substitute* "test/test_context.c"
                    (((string-append "SUITE_ADD_TEST\\(suite, " test "\\);")) "")))
                broken-tests)
               #t))))))
    (home-page "https://serf.apache.org/")
    (synopsis "High-performance asynchronous HTTP client library")
    (description
     "serf is a C-based HTTP client library built upon the Apache Portable
Runtime (APR) library.  It multiplexes connections, running the read/write
communication asynchronously.  Memory copies and transformations are kept to a
minimum to provide high performance operation.")
    ;; Most of the code is covered by the Apache License, Version 2.0, but the
    ;; bundled CuTest framework uses a different non-copyleft license.
    (properties
     '((release-monitoring-url . "https://serf.apache.org/download")))
    (license (list license:asl2.0 (license:non-copyleft "file://test/CuTest-README.txt")))))

(define-public libsass
  (package
    (name "libsass")
    ;; When updating, check whether sassc/libsass-3.5 is still needed.
    (version "3.6.4")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/sass/libsass")
                    (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0r8lfqvr3rjhjd8r036zd1wc9q17gyiskppcw9m13jks9an7xp4j"))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'bootstrap 'set-LIBSASS_VERSION
           (lambda _
             (setenv "LIBSASS_VERSION" ,version)
             #t)))))
    (native-inputs
     (list autoconf automake libtool))
    (home-page "https://sass-lang.com/libsass")
    (synopsis "SASS Compiler, implemented as a C/C++ library")
    (description
     "LibSass is a @acronym{SASS,Syntactically awesome style sheets} compiler
library designed for portability and efficiency.  To actually compile SASS
stylesheets, you'll need to use another program that uses this library,
@var{sassc} for example.")
    (license license:expat)))

(define-public sassc
  (package
    (name "sassc")
    (version "3.6.2")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/sass/sassc")
                    (commit  version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0m7flrs0hz3ivib8kvsgn3d0fgkabqviadkp1dyspa6iibx3gjwd"))))
    (build-system gnu-build-system)
    (arguments
     `(#:make-flags
       (list "CC=gcc"
             (string-append "PREFIX=" (assoc-ref %outputs "out")))
       #:tests? #f                      ; no test suite
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch-Makefile
           (lambda _
             (substitute* "Makefile"
               (("build-shared: \\$\\(RESOURCES\\) \\$\\(OBJECTS\\) \\$\\(LIB_SHARED\\)")
                "build-shared: $(RESOURCES) $(OBJECTS)")
               (("\\$\\(SASSC_EXE\\): libsass build")
                "$(SASSC_EXE): build")
               (("install: libsass-install-\\$\\(BUILD\\) \\\\")
                "install: \\"))
             #t))
         ;; This phase fails because…
         (delete 'bootstrap)
         ;; …there is no configure script to be generated.
         (delete 'configure)
         (add-before 'build 'setup-environment
           (lambda _
             (setenv "BUILD" "shared")
             (setenv "SASSC_VERSION" ,version)
             #t)))))
    (inputs
     (list libsass))
    (synopsis "CSS pre-processor")
    (description "SassC is a compiler written in C for the CSS pre-processor
language known as SASS.")
    (home-page "https://sass-lang.com/libsass")
    (license license:expat)))

(define-public sassc/libsass-3.5
  ;; Newer libsass versions suffor from a memory leak when building (some?)
  ;; GTK themes <https://github.com/sass/libsass/issues/3033>.
  (package
    (inherit sassc)
    (name "sassc")
    (inputs
     (list (package (inherit libsass)
                    (name "libsass")
                    (version "3.5.5")
                    (source (origin (method git-fetch)
                                    (uri (git-reference (url
                                                             "https://github.com/sass/libsass")
                                                        (commit version)))
                                    (file-name (git-file-name name version))
                                    (sha256 (base32
                                                    "0830pjcvhzxh6yixj82x5k5r1xnadjqzi16kp53213icbly0r9ma")))))))
    (properties '((hidden? . #t)))))

\f
(define-public perl-apache-logformat-compiler
  (package
    (name "perl-apache-logformat-compiler")
    (version "0.36")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/K/KA/KAZEBURO/"
                           "Apache-LogFormat-Compiler-" version ".tar.gz"))
       (sha256
        (base32 "05xcl7j65vakx7x79jqjikyw0nzf60bc2w6hhc0q5sklxq1ral4l"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-http-message perl-module-build-tiny perl-test-mocktime
           perl-try-tiny perl-uri))
    (propagated-inputs
     (list perl-posix-strftime-compiler))
    (arguments `(#:tests? #f))          ; TODO: Timezone test failures
    (home-page "https://metacpan.org/release/Apache-LogFormat-Compiler")
    (synopsis "Compile a log format string to perl-code")
    (description "This module provides methods to compile a log format string
to perl-code, for faster generation of access_log lines.")
    (license license:perl-license)))

(define-public perl-authen-sasl
  (package
    (name "perl-authen-sasl")
    (version "2.16")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/G/GB/GBARR/"
                           "Authen-SASL-" version ".tar.gz"))
       (sha256
        (base32
         "02afhlrdq5hh5g8b32fa79fqq5i76qzwfqqvfi9zi57h31szl536"))))
    (build-system perl-build-system)
    (arguments
     '(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'set-env
           ;; Fix the build with Perl 5.26.0. Try removing this phase for later
           ;; versions of perl-authen-sasl.
           (lambda _ (setenv "PERL_USE_UNSAFE_INC" "1") #t)))))
    (propagated-inputs
     (list perl-digest-hmac perl-gssapi))
    (home-page "https://metacpan.org/release/Authen-SASL")
    (synopsis "SASL authentication framework")
    (description "Authen::SASL provides an SASL authentication framework.")
    (license license:perl-license)))

(define-public perl-catalyst-action-renderview
  (package
    (name "perl-catalyst-action-renderview")
    (version "0.16")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/B/BO/BOBTFISH/"
                           "Catalyst-Action-RenderView-"
                           version ".tar.gz"))
       (sha256
        (base32
         "0j1rrld13cjk7ks92b5hv3xw4rfm2lvmksb4rlzd8mx0a0wj0rc5"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-http-request-ascgi perl-module-install))
    (propagated-inputs
     (list perl-catalyst-runtime perl-data-visitor perl-mro-compat))
    (home-page "https://metacpan.org/release/Catalyst-Action-RenderView")
    (synopsis "Sensible default Catalyst action")
    (description "This Catalyst action implements a sensible default end
action, which will forward to the first available view.")
    (license license:perl-license)))

(define-public perl-catalyst-action-rest
  (package
    (name "perl-catalyst-action-rest")
    (version "1.21")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://cpan/authors/id/J/JJ/JJNAPIORK/"
                                  "Catalyst-Action-REST-" version ".tar.gz"))
              (sha256
               (base32
                "086bykggzalbjfk0islac4b48g9s2ypj7y81d6ns1lq0aax1py6c"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-test-requires perl-module-install))
    (propagated-inputs
     (list perl-catalyst-runtime
           perl-class-inspector
           perl-config-general
           perl-cpanel-json-xs
           perl-libwww
           perl-moose
           perl-mro-compat
           perl-namespace-autoclean
           perl-params-validate
           perl-uri-find
           perl-xml-simple))
    (home-page "https://metacpan.org/release/Catalyst-Action-REST")
    (synopsis "Automated REST Method Dispatching")
    (description "This Action handles doing automatic method dispatching for
REST requests.  It takes a normal Catalyst action, and changes the dispatch to
append an underscore and method name.  First it will try dispatching to an
action with the generated name, and failing that it will try to dispatch to a
regular method.")
    (license license:perl-license)))

(define-public perl-catalyst-authentication-store-dbix-class
  (package
    (name "perl-catalyst-authentication-store-dbix-class")
    (version "0.1506")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
                           "Catalyst-Authentication-Store-DBIx-Class-"
                           version ".tar.gz"))
       (sha256
        (base32
         "0i5ja7690fs9nhxcij6lw51j804sm8s06m5mvk1n8pi8jljrymvw"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-catalyst-plugin-authorization-roles
           perl-catalyst-plugin-session-state-cookie perl-dbd-sqlite
           perl-module-install perl-test-www-mechanize-catalyst))
    (propagated-inputs
     (list perl-catalyst-runtime perl-catalyst-plugin-authentication
           perl-dbix-class perl-catalyst-model-dbic-schema))
    (home-page
     "https://metacpan.org/release/Catalyst-Authentication-Store-DBIx-Class")
    (synopsis "Storage class for Catalyst authentication using DBIx::Class")
    (description "The Catalyst::Authentication::Store::DBIx::Class class
provides access to authentication information stored in a database via
DBIx::Class.")
    (license license:perl-license)))

(define-public perl-catalyst-component-instancepercontext
  (package
    (name "perl-catalyst-component-instancepercontext")
    (version "0.001001")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/G/GR/GRODITI/"
                           "Catalyst-Component-InstancePerContext-"
                           version ".tar.gz"))
       (sha256
        (base32
         "0wfj4vnn2cvk6jh62amwlg050p37fcwdgrn9amcz24z6w4qgjqvz"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-install))
    (propagated-inputs
     (list perl-catalyst-runtime perl-moose))
    (home-page
     "https://metacpan.org/release/Catalyst-Component-InstancePerContext")
    (synopsis "Create only one instance of Moose component per context")
    (description "Catalyst::Component::InstancePerContext returns a new
instance of a component on each request.")
    (license license:perl-license)))

(define-public perl-catalyst-devel
  (package
    (name "perl-catalyst-devel")
    (version "1.42")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/H/HA/HAARG/"
                           "Catalyst-Devel-" version ".tar.gz"))
       (sha256
        (base32 "1gcaqivyxwsdq87v9za1ijjibh6llirzqsbpwjbw1f5mravg1iky"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-file-sharedir-install perl-test-fatal))
    (propagated-inputs
     (list perl-catalyst-action-renderview
           perl-catalyst-plugin-configloader
           perl-catalyst-plugin-static-simple
           perl-catalyst-runtime
           perl-config-general
           perl-file-changenotify
           perl-file-copy-recursive
           perl-file-sharedir
           perl-module-install
           perl-moose
           perl-moosex-emulate-class-accessor-fast
           perl-namespace-autoclean
           perl-namespace-clean
           perl-path-class
           perl-template-toolkit))
    (home-page "https://metacpan.org/release/Catalyst-Devel")
    (synopsis "Catalyst Development Tools")
    (description "The Catalyst-Devel distribution includes a variety of
modules useful for the development of Catalyst applications, but not required
to run them.  Catalyst-Devel includes the Catalyst::Helper system, which
autogenerates scripts and tests; Module::Install::Catalyst, a Module::Install
extension for Catalyst; and requirements for a variety of development-related
modules.")
    (license license:perl-license)))

(define-public perl-catalyst-dispatchtype-regex
  (package
    (name "perl-catalyst-dispatchtype-regex")
    (version "5.90035")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/M/MG/MGRIMES/"
                           "Catalyst-DispatchType-Regex-" version ".tar.gz"))
       (sha256
        (base32
         "06jq1lmpq88rmp9zik5gqczg234xac0hiyc3l698iif7zsgcyb80"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-build ;needs Module::Build >= 0.4004
           perl-namespace-autoclean perl-catalyst-runtime))
    (propagated-inputs
     (list perl-moose perl-text-simpletable))
    (home-page "https://metacpan.org/release/Catalyst-DispatchType-Regex")
    (synopsis "Regex DispatchType for Catalyst")
    (description "Dispatch type managing path-matching behaviour using
regexes.  Regex dispatch types have been deprecated and removed from Catalyst
core.  It is recommend that you use Chained methods or other techniques
instead.  As part of the refactoring, the dispatch priority of Regex vs Regexp
vs LocalRegex vs LocalRegexp may have changed.  Priority is now influenced by
when the dispatch type is first seen in your application.")
    (license license:perl-license)))

(define-public perl-catalyst-model-dbic-schema
  (package
  (name "perl-catalyst-model-dbic-schema")
  (version "0.65")
  (source
    (origin
      (method url-fetch)
      (uri (string-append "mirror://cpan/authors/id/G/GB/GBJK/"
                          "Catalyst-Model-DBIC-Schema-"
                          version ".tar.gz"))
      (sha256
        (base32
          "1spfjcjc0b9dv3k2gbanqj1m1cqzyxb32p76dhdwizzpbvpi3a96"))))
  (build-system perl-build-system)
  (native-inputs
   (list perl-dbd-sqlite perl-module-install perl-test-exception
         perl-test-requires))
  (propagated-inputs
   (list perl-carp-clan
         perl-catalyst-component-instancepercontext
         perl-catalyst-runtime
         perl-catalystx-component-traits
         perl-dbix-class
         perl-dbix-class-cursor-cached
         perl-dbix-class-schema-loader
         perl-hash-merge
         perl-list-moreutils
         perl-module-runtime
         perl-moose
         perl-moosex-markasmethods
         perl-moosex-nonmoose
         perl-moosex-types
         perl-moosex-types-loadableclass
         perl-namespace-autoclean
         perl-namespace-clean
         perl-tie-ixhash
         perl-try-tiny))
  (home-page "https://metacpan.org/release/Catalyst-Model-DBIC-Schema")
  (synopsis "DBIx::Class::Schema Model Class")
  (description "This is a Catalyst Model for DBIx::Class::Schema-based
Models.")
  (license license:perl-license)))

(define-public perl-catalyst-plugin-accesslog
  (package
    (name "perl-catalyst-plugin-accesslog")
    (version "1.10")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/A/AR/ARODLAND/"
                           "Catalyst-Plugin-AccessLog-" version ".tar.gz"))
       (sha256
        (base32
         "0811rj45q4v2y8wka3wb9d5m4vbyhcmkvddf2wz4x69awzjbhgc7"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-catalyst-runtime perl-datetime perl-moose
           perl-namespace-autoclean))
    (home-page "https://metacpan.org/release/Catalyst-Plugin-AccessLog")
    (synopsis "Request logging from within Catalyst")
    (description "This Catalyst plugin enables you to create \"access logs\"
from within a Catalyst application instead of requiring a webserver to do it
for you.  It will work even with Catalyst debug logging turned off.")
    (license license:perl-license)))

(define-public perl-catalyst-plugin-authentication
  (package
    (name "perl-catalyst-plugin-authentication")
    (version "0.10023")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/B/BO/BOBTFISH/"
                           "Catalyst-Plugin-Authentication-"
                           version ".tar.gz"))
       (sha256
        (base32
         "0v6hb4r1wv3djrnqvnjcn3xx1scgqzx8nyjdg9lfc1ybvamrl0rn"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-install))
    (propagated-inputs
     (list perl-catalyst-plugin-session
           perl-catalyst-runtime
           perl-class-inspector
           perl-moose
           perl-moosex-emulate-class-accessor-fast
           perl-mro-compat
           perl-namespace-autoclean
           perl-string-rewriteprefix
           perl-test-exception
           perl-try-tiny))
    (home-page "https://metacpan.org/release/Catalyst-Plugin-Authentication")
    (synopsis "Infrastructure plugin for the Catalyst authentication framework")
    (description "The authentication plugin provides generic user support for
Catalyst apps.  It is the basis for both authentication (checking the user is
who they claim to be), and authorization (allowing the user to do what the
system authorises them to do).")
    (license license:perl-license)))

(define-public perl-catalyst-plugin-authorization-roles
  (package
    (name "perl-catalyst-plugin-authorization-roles")
    (version "0.09")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/B/BO/BOBTFISH/"
                           "Catalyst-Plugin-Authorization-Roles-"
                           version ".tar.gz"))
       (sha256
        (base32
         "0l83lkwmq0lngwh8b1rv3r719pn8w1gdbyhjqm74rnd0wbjl8h7f"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-install perl-test-exception))
    (propagated-inputs
     (list perl-catalyst-plugin-authentication perl-catalyst-runtime
           perl-set-object perl-universal-isa))
    (home-page
     "https://metacpan.org/release/Catalyst-Plugin-Authorization-Roles")
    (synopsis "Role-based authorization for Catalyst")
    (description "Catalyst::Plugin::Authorization::Roles provides role-based
authorization for Catalyst based on Catalyst::Plugin::Authentication.")
    (license license:perl-license)))

(define-public perl-catalyst-plugin-captcha
  (package
    (name "perl-catalyst-plugin-captcha")
    (version "0.04")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/D/DI/DIEGOK/"
                           "Catalyst-Plugin-Captcha-" version ".tar.gz"))
       (sha256
        (base32
         "0llyj3v5nx9cx46jdbbvxf1lc9s9cxq5ml22xmx3wkb201r5qgaa"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-catalyst-plugin-session perl-catalyst-runtime
           perl-gd-securityimage perl-http-date))
    (home-page "https://metacpan.org/release/Catalyst-Plugin-Captcha")
    (synopsis "Captchas for Catalyst")
    (description "This plugin creates and validates Captcha images for
Catalyst.")
    (license license:perl-license)))

(define-public perl-catalyst-plugin-configloader
  (package
    (name "perl-catalyst-plugin-configloader")
    (version "0.35")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/H/HA/HAARG/"
                           "Catalyst-Plugin-ConfigLoader-"
                           version ".tar.gz"))
       (sha256
        (base32 "0w8r3bbxqnlykvra6sx3sh3wh8ylkj914xg5ql6nw11ddy56jaly"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-path-class perl-module-install))
    (propagated-inputs
     (list perl-catalyst-runtime perl-config-any perl-data-visitor
           perl-mro-compat))
    (home-page "https://metacpan.org/release/Catalyst-Plugin-ConfigLoader")
    (synopsis "Load config files of various types")
    (description "This module will attempt to load find and load configuration
files of various types.  Currently it supports YAML, JSON, XML, INI and Perl
formats.")
    (license license:perl-license)))

(define-public perl-catalyst-plugin-session
  (package
    (name "perl-catalyst-plugin-session")
    (version "0.41")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/J/JJ/JJNAPIORK/"
                           "Catalyst-Plugin-Session-" version ".tar.gz"))
       (sha256
        (base32 "0a451997zc2vjx7rvndgx1ldbrpic8sfbddyvncynh0zr8bhlqc5"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-install perl-test-deep perl-test-exception))
    (propagated-inputs
     (list perl-catalyst-runtime
           perl-moose
           perl-moosex-emulate-class-accessor-fast
           perl-mro-compat
           perl-namespace-clean
           perl-object-signature
           perl-test-www-mechanize-psgi))
    (home-page "https://metacpan.org/release/Catalyst-Plugin-Session")
    (synopsis "Catalyst generic session plugin")
    (description "This plugin links the two pieces required for session
management in web applications together: the state, and the store.")
    (license license:perl-license)))

(define-public perl-catalyst-plugin-session-state-cookie
  (package
    (name "perl-catalyst-plugin-session-state-cookie")
    (version "0.17")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/M/MS/MSTROUT/"
                           "Catalyst-Plugin-Session-State-Cookie-"
                           version ".tar.gz"))
       (sha256
        (base32
         "1rvxbfnpf9x2pc2zgpazlcgdlr2dijmxgmcs0m5nazs0w6xikssb"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-install))
    (propagated-inputs
     (list perl-catalyst-plugin-session perl-catalyst-runtime perl-moose
           perl-mro-compat perl-namespace-autoclean))
    (home-page
     "https://metacpan.org/release/Catalyst-Plugin-Session-State-Cookie")
    (synopsis "Maintain session IDs using cookies")
    (description "In order for Catalyst::Plugin::Session to work, the session
ID needs to be stored on the client, and the session data needs to be stored
on the server.  This plugin stores the session ID on the client using the
cookie mechanism.")
    (license license:perl-license)))

(define-public perl-catalyst-plugin-session-store-fastmmap
  (package
    (name "perl-catalyst-plugin-session-store-fastmmap")
    (version "0.16")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/B/BO/BOBTFISH/"
                           "Catalyst-Plugin-Session-Store-FastMmap-"
                           version ".tar.gz"))
       (sha256
        (base32
         "0x3j6zv3wr41jlwr6yb2jpmcx019ibyn11y8653ffnwhpzbpzsxs"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-cache-fastmmap
           perl-catalyst-plugin-session
           perl-catalyst-runtime
           perl-moosex-emulate-class-accessor-fast
           perl-mro-compat
           perl-path-class))
    (home-page
     "https://metacpan.org/release/Catalyst-Plugin-Session-Store-FastMmap")
    (synopsis "FastMmap session storage backend")
    (description "Catalyst::Plugin::Session::Store::FastMmap is a fast session
storage plugin for Catalyst that uses an mmap'ed file to act as a shared
memory interprocess cache.  It is based on Cache::FastMmap.")
    (license license:perl-license)))

(define-public perl-catalyst-plugin-stacktrace
  (package
    (name "perl-catalyst-plugin-stacktrace")
    (version "0.12")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/B/BO/BOBTFISH/"
                           "Catalyst-Plugin-StackTrace-" version ".tar.gz"))
       (sha256
        (base32
         "1b2ksz74cpigxqzf63rddar3vfmnbpwpdcbs11v0ml89pb8ar79j"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-install))
    (propagated-inputs
     (list perl-catalyst-runtime perl-devel-stacktrace perl-mro-compat))
    (home-page "https://metacpan.org/release/Catalyst-Plugin-StackTrace")
    (synopsis "Stack trace on the Catalyst debug screen")
    (description "This plugin enhances the standard Catalyst debug screen by
including a stack trace of your application up to the point where the error
occurred.  Each stack frame is displayed along with the package name, line
number, file name, and code context surrounding the line number.")
    (license license:perl-license)))

(define-public perl-catalyst-plugin-static-simple
  (package
    (name "perl-catalyst-plugin-static-simple")
    (version "0.36")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/I/IL/ILMARI/"
                           "Catalyst-Plugin-Static-Simple-" version ".tar.gz"))
       (sha256
        (base32
         "0m4l627p2fvzr4i6sgdxhdvsx4wpa6qmaibsbxlg5x5yjs7k7drn"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-install))
    (propagated-inputs
     (list perl-catalyst-runtime perl-mime-types perl-moose
           perl-moosex-types perl-namespace-autoclean))
    (home-page "https://metacpan.org/release/Catalyst-Plugin-Static-Simple")
    (synopsis "Simple serving of static pages")
    (description "The Static::Simple plugin is designed to make serving static
content in your application during development quick and easy, without
requiring a single line of code from you.  This plugin detects static files by
looking at the file extension in the URL (such as .css or .png or .js).  The
plugin uses the lightweight MIME::Types module to map file extensions to
IANA-registered MIME types, and will serve your static files with the correct
MIME type directly to the browser, without being processed through Catalyst.")
    (license license:perl-license)))

(define-public perl-catalyst-runtime
  (package
    (name "perl-catalyst-runtime")
    (version "5.90124")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/J/JJ/JJNAPIORK/"
                           "Catalyst-Runtime-" version ".tar.gz"))
       (sha256
        (base32
         "001yk1i0xwn4v308qx15nvnp6v9qfdigdlvz1rgw5zpnq7kwnq1a"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-test-fatal))
    (propagated-inputs
     (list perl-cgi-simple
           perl-cgi-struct
           perl-class-c3-adopt-next
           perl-class-date
           perl-class-load
           perl-data-dump
           perl-http-body
           perl-http-message
           perl-json-maybexs
           perl-libwww
           perl-module-pluggable
           perl-moose
           perl-moosex-emulate-class-accessor-fast
           perl-moosex-getopt
           perl-moosex-methodattributes
           perl-namespace-clean
           perl-path-class
           perl-perlio-utf8_strict
           perl-plack
           perl-plack-middleware-fixmissingbodyinredirect
           perl-plack-middleware-methodoverride
           perl-plack-middleware-removeredundantbody
           perl-plack-middleware-reverseproxy
           perl-plack-test-externalserver
           perl-safe-isa
           perl-string-rewriteprefix
           perl-text-simpletable
           perl-tree-simple
           perl-tree-simple-visitorfactory
           perl-try-tiny
           perl-uri
           perl-uri-ws))
    (home-page "https://metacpan.org/release/Catalyst-Runtime")
    (synopsis "The Catalyst Framework Runtime")
    (description "Catalyst is a modern framework for making web applications.
It is designed to make it easy to manage the various tasks you need to do to
run an application on the web, either by doing them itself, or by letting you
\"plug in\" existing Perl modules that do what you need.")
    (license license:perl-license)))

(define-public perl-catalyst-traitfor-request-proxybase
  (package
    (name "perl-catalyst-traitfor-request-proxybase")
    (version "0.000005")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/B/BO/BOBTFISH/"
                           "Catalyst-TraitFor-Request-ProxyBase-"
                           version ".tar.gz"))
       (sha256
        (base32
         "02kir63d5cs2ipj3fn1qlmmx3gqi1xqzrxfr4pv5vjhjgsm0zgx7"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-catalyst-runtime perl-catalystx-roleapplicator
           perl-http-message perl-module-install))
    (propagated-inputs
     (list perl-moose perl-namespace-autoclean perl-uri))
    (home-page
     "https://metacpan.org/release/Catalyst-TraitFor-Request-ProxyBase")
    (synopsis "Replace request base with value passed by HTTP proxy")
    (description "This module is a Moose::Role which allows you more
flexibility in your application's deployment configurations when deployed
behind a proxy.  Using this module, the request base ($c->req->base) is
replaced with the contents of the X-Request-Base header.")
    (license license:perl-license)))

(define-public perl-catalyst-view-download
  (package
    (name "perl-catalyst-view-download")
    (version "0.09")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/G/GA/GAUDEON/"
                           "Catalyst-View-Download-" version ".tar.gz"))
       (sha256
        (base32
         "1qgq6y9iwfbhbkbgpw9czang2ami6z8jk1zlagrzdisy4igqzkvs"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-catalyst-runtime
           perl-module-install
           perl-test-simple
           perl-test-www-mechanize-catalyst
           perl-text-csv
           perl-xml-simple))
    (home-page "https://metacpan.org/release/Catalyst-View-Download")
    (synopsis "Download data in many formats")
    (description "The purpose of this module is to provide a method for
downloading data into many supportable formats.  For example, downloading a
table based report in a variety of formats (CSV, HTML, etc.).")
    (license license:perl-license)))

(define-public perl-catalyst-view-json
  (package
    (name "perl-catalyst-view-json")
    (version "0.37")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/H/HA/HAARG/"
                           "Catalyst-View-JSON-" version ".tar.gz"))
       (sha256
        (base32
         "1v4xkzazs743sc7cd1kxkbi99cf00a4dadyyancckcbpi9p3znn5"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-install perl-yaml))
    (inputs
     (list perl-catalyst-runtime perl-json-maybexs perl-mro-compat))
    (home-page "https://metacpan.org/release/Catalyst-View-JSON")
    (synopsis "Catalyst JSON view")
    (description "Catalyst::View::JSON is a Catalyst View handler that returns
stash data in JSON format.")
    (license license:perl-license)))

(define-public perl-catalyst-view-tt
  (package
    (name "perl-catalyst-view-tt")
    (version "0.45")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/H/HA/HAARG/"
                           "Catalyst-View-TT-" version ".tar.gz"))
     (sha256
      (base32 "0jzgpkgq5pwq82zlb0nykdyk40dfpsyn9ilz91d0wpixgi9i5pr8"))))
  (build-system perl-build-system)
  (propagated-inputs
   (list perl-catalyst-runtime
         perl-class-accessor
         perl-data-dump
         perl-mro-compat
         perl-path-class
         perl-template-timer
         perl-template-toolkit))
  (home-page "https://metacpan.org/release/Catalyst-View-TT")
  (synopsis "Template View Class")
  (description "This module is a Catalyst view class for the Template
Toolkit.")
  (license license:perl-license)))

(define-public perl-catalystx-component-traits
  (package
    (name "perl-catalystx-component-traits")
    (version "0.19")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/R/RK/RKITOVER/"
                           "CatalystX-Component-Traits-" version ".tar.gz"))
       (sha256
        (base32
         "0iq4ci8m6g2c4g01fvdl568y7pjz28f3widk986v3pyhr7ll8j88"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-moose perl-catalyst-runtime perl-moosex-methodattributes))
    (propagated-inputs
     (list perl-catalyst-runtime
           perl-class-load
           perl-moose
           perl-moosex-traits-pluggable
           perl-namespace-autoclean
           perl-list-moreutils))
    (home-page "https://metacpan.org/release/CatalystX-Component-Traits")
    (synopsis "Trait Loading and Resolution for Catalyst Components")
    (description "Adds a \"COMPONENT\" in Catalyst::Component method to your
Catalyst component base class that reads the optional \"traits\" parameter
from app and component config and instantiates the component subclass with
those traits using \"new_with_traits\" in MooseX::Traits from
MooseX::Traits::Pluggable.")
    (license license:perl-license)))

(define-public perl-catalystx-roleapplicator
  (package
    (name "perl-catalystx-roleapplicator")
    (version "0.005")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/H/HD/HDP/"
                           "CatalystX-RoleApplicator-" version ".tar.gz"))
       (sha256
        (base32
         "0vwaapxn8g5hs2xp63c4dwv9jmapmji4272fakssvgc9frklg3p2"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-catalyst-runtime perl-moose perl-moosex-relatedclassroles))
    (home-page "https://metacpan.org/release/CatalystX-RoleApplicator")
    (synopsis "Apply roles to Catalyst classes")
    (description "CatalystX::RoleApplicator applies roles to Catalyst
application classes.")
    (license license:perl-license)))

(define-public perl-catalystx-script-server-starman
  (package
    (name "perl-catalystx-script-server-starman")
    (version "0.03")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/A/AB/ABRAXXA/"
                           "CatalystX-Script-Server-Starman-"
                           version ".tar.gz"))
       (sha256
        (base32
         "08jvibq4v8xjj0c3cr93h0w8w0c88ajwjn37xjy7ygxl9krlffp6"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-install perl-pod-parser perl-test-www-mechanize-catalyst))
    (propagated-inputs
     (list perl-catalyst-runtime perl-moose perl-namespace-autoclean
           starman))
    (home-page "https://metacpan.org/release/CatalystX-Script-Server-Starman")
    (synopsis "Catalyst development server with Starman")
    (description "This module provides a Catalyst extension to replace the
development server with Starman.")
    (license license:perl-license)))

(define-public perl-cgi
  (package
    (name "perl-cgi")
    (version "4.55")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/L/LE/LEEJO/"
                           "CGI-" version ".tar.gz"))
       (sha256
        (base32 "1ck4ik5i0v394qgg9qah4p6x9hyls311g6iwi6ildprzn6a5x2b7"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-test-nowarnings perl-test-warn))
    (propagated-inputs
     (list perl-html-parser))
    (home-page "https://metacpan.org/release/CGI")
    (synopsis "Handle Common Gateway Interface requests and responses")
    (description "CGI.pm is a stable, complete and mature solution for
processing and preparing HTTP requests and responses.  Major features include
processing form submissions, file uploads, reading and writing cookies, query
string generation and manipulation, and processing and preparing HTTP
headers.")
    (license license:perl-license)))

(define-public perl-cgi-formbuilder
  (package
    (name "perl-cgi-formbuilder")
    (version "3.10")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://cpan.metacpan.org/authors/id/B/BI/BIGPRESH/"
             "CGI-FormBuilder-" version ".tar.gz"))
       (sha256
        (base32
         "163ixq9kninqq094z2rnkg9pv3bcmvjphlww4vksfrzhq3h9pjdf"))))
    (build-system perl-build-system)
    (inputs (list perl-cgi))
    (home-page
     "https://metacpan.org/release/CGI-FormBuilder")
    (synopsis
     "Generate and process stateful forms")
    (description
     "@code{CGI::FormBuilder} provides an easy way to generate and process CGI
form-based applications.")
    (license license:perl-license)))

(define-public perl-cgi-session
  (package
    (name "perl-cgi-session")
    (version "4.48")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "mirror://cpan/authors/id/M/MA/MARKSTOS/CGI-Session-"
             version
             ".tar.gz"))
       (sha256
        (base32
         "1xsl2pz1jrh127pq0b01yffnj4mnp9nvkp88h5mndrscq9hn8xa6"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-build))
    (inputs (list perl-cgi))
    (home-page
     "https://metacpan.org/release/CGI-Session")
    (synopsis
     "Persistent session data in CGI applications")
    (description
     "@code{CGI::Session} provides modular session management system across
HTTP requests.")
    (license license:perl-license)))

(define-public perl-cgi-simple
  (package
    (name "perl-cgi-simple")
    (version "1.22")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/M/MA/MANWAR/"
                           "CGI-Simple-" version ".tar.gz"))
       (sha256
        (base32 "13c7iwnnavky10ab87pi8jc1kqph03s0rhvj7myn7szhbfisc4gn"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-io-stringy ; for IO::Scalar
           perl-module-build perl-test-exception perl-test-nowarnings))
    (home-page "https://metacpan.org/release/CGI-Simple")
    (synopsis "CGI interface that is CGI.pm compliant")
    (description "CGI::Simple provides a relatively lightweight drop in
replacement for CGI.pm.  It shares an identical OO interface to CGI.pm for
parameter parsing, file upload, cookie handling and header generation.")
    (license license:perl-license)))

(define-public perl-cgi-struct
  (package
    (name "perl-cgi-struct")
    (version "1.21")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/F/FU/FULLERMD/"
                           "CGI-Struct-" version ".tar.gz"))
       (sha256
        (base32
         "0v4xq2qpryr7i6jngw1wpn8yr2kiib10yxp4aih90vfdznkqsgfi"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-test-deep))
    (home-page "https://metacpan.org/release/CGI-Struct")
    (synopsis "Build structures from CGI data")
    (description "This is a module for building structured data from CGI
inputs, in a manner reminiscent of how PHP does.")
    (license license:bsd-2)))

(define-public perl-datetime-format-http
  (package
    (name "perl-datetime-format-http")
    (version "0.42")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/C/CK/CKRAS/"
                           "DateTime-Format-HTTP-" version ".tar.gz"))
       (sha256
        (base32
         "0h6qqdg1yzqkdxp7hqlp0qa7d1y64nilgimxs79dys2ryjfpcknh"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-build))
    (propagated-inputs
     (list perl-datetime perl-http-date))
    (home-page "https://metacpan.org/release/DateTime-Format-HTTP")
    (synopsis "Date conversion routines")
    (description "This module provides functions that deal with the date
formats used by the HTTP protocol.")
    (license license:perl-license)))

(define-public perl-digest-md5-file
  (package
    (name "perl-digest-md5-file")
    (version "0.08")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/D/DM/DMUEY/"
                           "Digest-MD5-File-" version ".tar.gz"))
       (sha256
        (base32
         "060jzf45dlwysw5wsm7av1wvpl06xgk415kwwpvv89r6wda3md5d"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-libwww))
    (home-page "https://metacpan.org/release/Digest-MD5-File")
    (synopsis "MD5 sums for files and urls")
    (description "Digest::MD5::File is a Perl extension for getting MD5 sums
for files and urls.")
    (license license:perl-license)))

(define-public perl-encode-locale
  (package
    (name "perl-encode-locale")
    (version "1.05")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "mirror://cpan/authors/id/G/GA/GAAS/Encode-Locale-"
                   version ".tar.gz"))
             (sha256
              (base32
               "1h8fvcdg3n20c2yp7107yhdkkx78534s9hnvn7ps8hpmf4ks0vqp"))))
    (build-system perl-build-system)
    (license license:perl-license)
    (synopsis "Perl locale encoding determination")
    (description
     "The POSIX locale system is used to specify both the language
conventions requested by the user and the preferred character set to
consume and output.  The Encode::Locale module looks up the charset and
encoding (called a CODESET in the locale jargon) and arranges for the
Encode module to know this encoding under the name \"locale\".  It means
bytes obtained from the environment can be converted to Unicode strings
by calling Encode::encode(locale => $bytes) and converted back again
with Encode::decode(locale => $string).")
    (home-page "https://metacpan.org/release/Encode-Locale")))

(define-public perl-feed-find
  (package
    (name "perl-feed-find")
    (version "0.07")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://cpan/authors/id/B/BT/BTROTT/"
                                  "Feed-Find-" version ".tar.gz"))
              (sha256
               (base32
                "0sa33cm8ww55cymnl8j7b5yspi2y5xkkkgqqa4h6fs3wdqylz600"))))
    (build-system perl-build-system)
    (arguments
     ;; Tests expect to query files at http://stupidfool.org/perl/feeds/
     `(#:tests? #f
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'set-env
           (lambda _ (setenv "PERL_USE_UNSAFE_INC" "1"))))))
    (inputs
     (list perl-class-errorhandler perl-html-parser perl-libwww perl-uri))
    (home-page "https://metacpan.org/release/Feed-Find")
    (synopsis "Syndication feed auto-discovery")
    (description "@code{Feed::Find} implements feed auto-discovery for finding
syndication feeds, given a URI.  It will discover the following feed formats:
RSS 0.91, RSS 1.0, RSS 2.0, Atom.")
    (license license:perl-license)))

(define-public perl-file-listing
  (package
    (name "perl-file-listing")
    (version "6.15")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "mirror://cpan/authors/id/P/PL/PLICEASE/File-Listing-"
                   version ".tar.gz"))
             (sha256
              (base32
               "033p2ckkjbxrl390x8aq4wq4fpj5aidsazkbw82mhqxrksgzpi26"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-http-date))
    (license license:perl-license)
    (synopsis "Perl directory listing parser")
    (description
     "The File::Listing module exports a single function called parse_dir(),
which can be used to parse directory listings.")
    (home-page "https://metacpan.org/release/File-Listing")))

(define-public perl-finance-quote
  (package
   (name "perl-finance-quote")
   (version "1.59")
   (source
    (origin
      (method url-fetch)
      (uri (string-append "https://cpan.metacpan.org/authors/id/B/BP/BPSCHUCK/"
                          "Finance-Quote-" version ".tar.gz"))
      (sha256
       (base32 "0a19y5bj2pvdlfi747ihgz5khjlfkhjakv712r0gz0n6miwjiscs"))))
   (build-system perl-build-system)
   (native-inputs
     (list perl-test-harness
           perl-date-manip
           perl-date-range
           perl-date-simple
           perl-datetime
           perl-datetime-format-iso8601
           perl-string-util
           perl-pathtools
           perl-test-pod
           perl-test-pod-coverage))
   (propagated-inputs
    (list perl-datetime
          perl-datetime-format-strptime
          perl-html-parser
          perl-html-tableextract
          perl-html-tokeparser-simple
          perl-html-tree
          perl-html-treebuilder-xpath
          perl-http-cookiejar
          perl-http-cookies
          perl-http-message
          perl-io-string
          perl-json
          perl-libwww
          perl-lwp-protocol-https
          perl-mozilla-ca
          perl-spreadsheet-xlsx
          perl-readonly
          perl-string-util
          perl-text-template
          perl-try-tiny
          perl-web-scraper
          perl-xml-libxml))
   (home-page "https://metacpan.org/release/Finance-Quote")
   (synopsis "Stock and mutual fund quotes")
   (description
    "The @code{Finance::Quote} module retries stock quotes from various
internet sources, including Yahoo! Finance, Fidelity Investments, and the
Australian Stock Exchange.")
   (license license:gpl2)))

(define-public perl-gssapi
  (package
    (name "perl-gssapi")
    (version "0.28")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/A/AG/AGROLMS/"
                           "GSSAPI-" version ".tar.gz"))
       (sha256
        (base32
         "1mkhwxjjlhr58pd770i9gnf7zy7jj092iv6jfbnb8bvnc5xjr3vx"))))
    (build-system perl-build-system)
    (inputs `(("gssapi" ,mit-krb5)))
    (arguments
     `(#:make-maker-flags
       `(,(string-append "--gssapiimpl=" (assoc-ref %build-inputs "gssapi")))))
    (home-page "https://metacpan.org/release/GSSAPI")
    (synopsis "Perl extension providing access to the GSSAPIv2 library")
    (description "This is a Perl extension for using GSSAPI C bindings as
described in RFC 2744.")
    (license license:perl-license)))

(define-public perl-html-element-extended
  (package
    (name "perl-html-element-extended")
    (version "1.18")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/M/MS/MSISK/"
                           "HTML-Element-Extended-" version ".tar.gz"))
       (sha256
        (base32
         "0axknss8c368r5i082yhkfj8mq0w4nglfrpcxcayyzzj13qimvzk"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-html-tree))
    (home-page "https://metacpan.org/release/HTML-Element-Extended")
    (synopsis "Manipulate tables of HTML::Element")
    (description
     "HTML::Element::Extended is a Perl extension for manipulating a table
composed of HTML::Element style components.")
    (license license:perl-license)))

(define-public perl-html-form
  (package
    (name "perl-html-form")
    (version "6.05")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/O/OA/OALDERS/"
                           "HTML-Form-" version ".tar.gz"))
       (sha256
        (base32 "14i4ldyvdvhdhvfhh9kiq6z853q2f84biq8vcpv1k5w2r80wdiin"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-html-parser perl-html-tagset perl-http-message
           perl-lwp-mediatypes perl-uri))
    (home-page "https://metacpan.org/release/HTML-Form")
    (synopsis "Perl class representing an HTML form element")
    (description "Objects of the HTML::Form class represents a single HTML
<form> ... </form> instance.")
    (license license:perl-license)))

(define-public perl-html-scrubber
  (package
    (name "perl-html-scrubber")
    (version "0.17")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "mirror://cpan/authors/id/N/NI/NIGELM/HTML-Scrubber-"
             version
             ".tar.gz"))
       (sha256
        (base32
         "06p7w4zd42b2yh541mlzyqj40lwmvvn3fyqi8big4mf34la7m2jm"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-build
           perl-test-cpan-meta
           perl-test-differences
           perl-test-eol
           perl-test-memory-cycle
           perl-test-notabs))
    (inputs
     (list perl-html-parser))
    (home-page
     "https://metacpan.org/release/HTML-Scrubber")
    (synopsis
     "Perl extension for scrubbing/sanitizing html")
    (description
     "@code{HTML::Scrubber} Perl extension for scrubbing/sanitizing HTML.")
    (license license:perl-license)))

(define-public perl-html-lint
  (package
    (name "perl-html-lint")
    (version "2.32")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/P/PE/PETDANCE/"
                           "HTML-Lint-" version ".tar.gz"))
       (sha256
        (base32 "0lk02xpfxcg7ij4dvpsa4wjlzhmiizj0jfr3rwmdpbj69nvc93br"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-html-parser perl-html-tagset perl-libwww))
    (home-page "https://metacpan.org/release/HTML-Lint")
    (synopsis "Check for HTML errors in a string or file")
    (description "HTML::Lint is a pure-Perl HTML parser and checker for
syntactic legitmacy.")
    (license license:artistic2.0)))

(define-public perl-html-selector-xpath
  (package
    (name "perl-html-selector-xpath")
    (version "0.28")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "mirror://cpan/authors/id/C/CO/CORION/HTML-Selector-XPath-" version
             ".tar.gz"))
       (sha256
        (base32 "03wdwnrf0bvr2dw01njnz3a9mw2kl7ad7krh25j3vkyj7vq1f9s3"))))
    (build-system perl-build-system)
    (native-inputs (list perl-test-base
                         perl-test-pod))
    (home-page "https://metacpan.org/release/HTML-Selector-XPath")
    (synopsis "CSS Selector to XPath compiler")
    (description "@code{HTML::Selector::XPath} is a Perl module for parsing
and scraping XML/HTML documents using XPath expressions.")
    (license license:perl-license)))

(define-public perl-html-tableextract
  (package
    (name "perl-html-tableextract")
    (version "2.13")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://cpan.metacpan.org/authors/id/M/MS/MSISK/"
                           "HTML-TableExtract-" version ".tar.gz"))
       (sha256
        (base32
         "01jimmss3q68a89696wmclvqwb2ybz6xgabpnbp6mm6jcni82z8a"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-html-element-extended perl-html-parser))
    (home-page "https://metacpan.org/release/HTML-TableExtract")
    (synopsis "Extract contents from HTML tables")
    (description
     "HTML::TableExtract is a Perl module for extracting the content contained
in tables within an HTML document, either as text or encoded element trees.")
    (license license:perl-license)))

(define-public perl-html-tokeparser-simple
  (package
    (name "perl-html-tokeparser-simple")
    (version "3.16")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "mirror://cpan/authors/id/O/OV/OVID/HTML-TokeParser-Simple-"
             version ".tar.gz"))
       (sha256
        (base32 "17aa1v62sp8ycxcicwhankmj4brs6nnfclk9z7mf1rird1f164gd"))))
    (build-system perl-build-system)
    (native-inputs (list perl-module-build))
    (propagated-inputs (list perl-html-parser
                             perl-html-tagset
                             perl-sub-override))
    (home-page "https://metacpan.org/release/HTML-TokeParser-Simple")
    (synopsis "Easy to use parsing interface")
    (description "Provides @code{HTML::TokeParser::Simple}, a simpler interface
to @code{HTML::TokeParser} for parsing HTML.")
    (license license:perl-license)))

(define-public perl-html-tree
  (package
    (name "perl-html-tree")
    (version "5.07")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/K/KE/KENTNL/"
                           "HTML-Tree-" version ".tar.gz"))
       (sha256
        (base32
         "1gyvm4qlwm9y6hczkpnrdfl303ggbybr0nqxdjw09hii8yw4sdzh"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-build perl-test-fatal))
    (propagated-inputs
     (list perl-html-parser perl-html-tagset perl-libwww))
    (home-page "https://metacpan.org/release/HTML-Tree")
    (synopsis "Work with HTML in a DOM-like tree structure")
    (description "This distribution contains a suite of modules for
representing, creating, and extracting information from HTML syntax trees.")
    (license license:perl-license)))

(define-public perl-html-parser
  (package
    (name "perl-html-parser")
    (version "3.72")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "mirror://cpan/authors/id/G/GA/GAAS/HTML-Parser-"
                   version ".tar.gz"))
             (sha256
              (base32
               "12v05ywlnsi9lc17z32k9jxx3sj1viy7y1wpl7n4az76v7hwfa7c"))))
    (build-system perl-build-system)
    (inputs
     (list perl-html-tagset perl-http-message))
    (license license:perl-license)
    (synopsis "Perl HTML parser class")
    (description
     "Objects of the HTML::Parser class will recognize markup and separate
it from plain text (alias data content) in HTML documents.  As different
kinds of markup and text are recognized, the corresponding event handlers
are invoked.")
    (home-page "https://metacpan.org/release/HTML-Parser")))

(define-public perl-html-tagset
  (package
    (name "perl-html-tagset")
    (version "3.20")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "mirror://cpan/authors/id/P/PE/PETDANCE/HTML-Tagset-"
                   version ".tar.gz"))
             (sha256
              (base32
               "1qh8249wgr4v9vgghq77zh1d2zs176bir223a8gh3k9nksn7vcdd"))))
    (build-system perl-build-system)
    (license license:perl-license)
    (synopsis "Perl data tables useful in parsing HTML")
    (description
     "The HTML::Tagset module contains several data tables useful in various
kinds of HTML parsing operations.")
    (home-page "https://metacpan.org/release/HTML-Tagset")))

(define-public perl-html-template
  (package
    (name "perl-html-template")
    (version "2.97")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://cpan/authors/id/S/SA/SAMTREGAR/"
                                  "HTML-Template-" version ".tar.gz"))
              (sha256
               (base32
                "17qjw8swj2q4b1ic285pndgrkmvpsqw0j68nhqzpk1daydhsyiv5"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-cgi))
    (home-page "https://metacpan.org/release/HTML-Template")
    (synopsis "HTML-like templates")
    (description
     "This module attempts to make using HTML templates simple and natural.
It extends standard HTML with a few new HTML-esque tags: @code{<TMPL_VAR>},
@code{<TMPL_LOOP>}, @code{<TMPL_INCLUDE>}, @code{<TMPL_IF>},
@code{<TMPL_ELSE>} and @code{<TMPL_UNLESS>}.  The file written with HTML and
these new tags is called a template.  Using this module you fill in the values
for the variables, loops and branches declared in the template.  This allows
you to separate design from the data.")
    (license license:perl-license)))

(define-public perl-html-treebuilder-xpath
  (package
    (name "perl-html-treebuilder-xpath")
    (version "0.14")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "mirror://cpan/authors/id/M/MI/MIROD/HTML-TreeBuilder-XPath-"
             version ".tar.gz"))
       (sha256
        (base32 "1wx4i1scng20n405fp3a4vrwvvq9bvbmg977wnd5j2ja8jrbvsr5"))))
    (build-system perl-build-system)
    (propagated-inputs (list perl-html-tree perl-xml-xpathengine))
    (home-page "https://metacpan.org/release/HTML-TreeBuilder-XPath")
    (synopsis "XPath support for @code{HTML::TreeBuilder}")
    (description "This module implements @code{HTML::TreeBuilder::XPath} for
@code{HTML::TreeBuilder}, making it easy to parse documents using XPath.")
    (license license:perl-license)))

(define-public perl-http-body
  (package
    (name "perl-http-body")
    (version "1.22")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/G/GE/GETTY/"
                           "HTTP-Body-" version ".tar.gz"))
       (sha256
        (base32
         "15vj488i62mdp4ps9k77h39prj70i7anb6b0j8nm7l9vbdc2q3gw"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-test-deep))
    (propagated-inputs
     (list perl-file-temp perl-http-message)) ;For HTTP::Headers
    (home-page "https://metacpan.org/release/HTTP-Body")
    (synopsis "HTTP Body Parser")
    (description "HTTP::Body parses chunks of HTTP POST data and supports
application/octet-stream, application/json, application/x-www-form-urlencoded,
and multipart/form-data.")
    (license license:perl-license)))

(define-public perl-http-cookiejar
  (package
    (name "perl-http-cookiejar")
    (version "0.012")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/D/DA/DAGOLDEN/"
                           "HTTP-CookieJar-" version ".tar.gz"))
       (sha256
        (base32 "0jk0ps4i67dhhhwaxwwa9nkv3n6n5w44xlnwyzvk59735pwvyjh0"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-test-deep perl-test-requires perl-time-mock perl-uri))
    (inputs
     (list perl-time-local perl-http-date))
    (home-page "https://metacpan.org/release/HTTP-CookieJar")
    (synopsis "Minimalist HTTP user agent cookie jar")
    (description "This module implements a minimalist HTTP user agent cookie
jar in conformance with RFC 6265 <http://tools.ietf.org/html/rfc6265>.")
    (license license:asl2.0)))

(define-public perl-http-cookies
  (package
    (name "perl-http-cookies")
    (version "6.10")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "mirror://cpan/authors/id/O/OA/OALDERS/HTTP-Cookies-"
                   version ".tar.gz"))
             (sha256
              (base32
               "01vhppq18g6ppn3z9mvdfghfzibwg1sczzvnp3jbbrjw7iikcvz3"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-http-message))
    (license license:perl-license)
    (synopsis "Perl HTTP cookie jars")
    (description
     "The HTTP::Cookies class is for objects that represent a cookie jar,
that is, a database of all the HTTP cookies that a given LWP::UserAgent
object knows about.")
    (home-page "https://metacpan.org/release/GAAS/HTTP-Cookies-6.01")))

(define-public perl-http-daemon
  (package
    (name "perl-http-daemon")
    (version "6.14")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "mirror://cpan/authors/id/O/OA/OALDERS/HTTP-Daemon-"
                   version ".tar.gz"))
             (sha256
              (base32
               "079fkcq2vdrzdf0bml52kz73n9gdv1xg0qf72c9v505v7izpwxph"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-build perl-test-needs))
    (propagated-inputs
     (list perl-http-message perl-lwp-mediatypes))
    (license license:perl-license)
    (synopsis "Perl simple http server class")
    (description
     "Instances of the HTTP::Daemon class are HTTP/1.1 servers that listen
on a socket for incoming requests.  The HTTP::Daemon is a subclass of
IO::Socket::INET, so you can perform socket operations directly on it too.")
    (home-page "https://metacpan.org/release/HTTP-Daemon")))

(define-public perl-http-date
  (package
    (name "perl-http-date")
    (version "6.05")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "mirror://cpan/authors/id/O/OA/OALDERS/HTTP-Date-"
                   version ".tar.gz"))
             (sha256
              (base32
               "0awjdbz7x0jd5pna55dwxhs3k6xp3sw6b2zg3p2yndxxvya64p9n"))))
    (build-system perl-build-system)
    (license license:perl-license)
    (synopsis "Perl date conversion routines")
    (description
     "The HTTP::Date module provides functions that deal with date formats
used by the HTTP protocol (and then some more).")
    (home-page "https://metacpan.org/release/HTTP-Date")))

(define-public perl-http-lite
  (package
    (name "perl-http-lite")
    (version "2.44")
    (source
     (origin
      (method url-fetch)
      (uri (string-append
            "mirror://cpan/authors/id/N/NE/NEILB/HTTP-Lite-"
            version ".tar.gz"))
      (sha256
       (base32
        "0z77nflj8zdcfg70kc93glq5kmd6qxn2nf7h70x4xhfg25wkvr1q"))))
    (build-system perl-build-system)
    (native-inputs (list perl-cgi))
    (home-page "https://metacpan.org/release/HTTP-Lite")
    (synopsis "Lightweight HTTP implementation")
    (description "@code{HTTP::Lite} is a stand-alone lightweight
HTTP/1.1 implementation for perl.  It is intended for use in
situations where it is desirable to install the minimal number of
modules to achieve HTTP support.  @code{HTTP::Lite} is ideal for
CGI (or mod_perl) programs or for bundling for redistribution with
larger packages where only HTTP GET and POST functionality are
necessary.  @code{HTTP::Lite} is compliant with the Host header,
necessary for name based virtual hosting, and supports proxies.
Additionally, @code{HTTP::Lite} supports a callback to allow
processing of request data as it arrives.")
    (license license:perl-license)))

(define-public perl-http-message
  (package
    (name "perl-http-message")
    (version "6.37")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "mirror://cpan/authors/id/O/OA/OALDERS/HTTP-Message-"
                   version ".tar.gz"))
             (sha256
              (base32
               "00nq0xnpdba4valzgvzy3fgvck1ijrksdyzb4w9q6j72hl5dln8f"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-test-needs perl-try-tiny))
    (propagated-inputs
     (list perl-encode-locale perl-http-date perl-io-html
           perl-lwp-mediatypes perl-uri))
    (license license:perl-license)
    (synopsis "Perl HTTP style message")
    (description
     "An HTTP::Message object contains some headers and a content body.")
    (home-page "https://metacpan.org/release/ETHER/HTTP-Message-6.11")))

(define-public perl-http-negotiate
  (package
    (name "perl-http-negotiate")
    (version "6.01")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "mirror://cpan/authors/id/G/GA/GAAS/HTTP-Negotiate-"
                   version ".tar.gz"))
             (sha256
              (base32
               "05p053vjs5g91v5cmjnny7a3xzddz5k7vnjw81wfh01ilqg9qwhw"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-http-message))
    (license license:perl-license)
    (synopsis "Perl http content negotiation")
    (description
     "The HTTP::Negotiate module provides a complete implementation of the
HTTP content negotiation algorithm specified in
draft-ietf-http-v11-spec-00.ps chapter 12.  Content negotiation allows for
the selection of a preferred content representation based upon attributes
of the negotiable variants and the value of the various Accept* header
fields in the request.")
    (home-page "https://metacpan.org/release/HTTP-Negotiate")))

(define-public perl-http-parser
  (package
    (name "perl-http-parser")
    (version "0.06")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/E/ED/EDECA/"
                           "HTTP-Parser-" version ".tar.gz"))
       (sha256
        (base32
         "0idwq3jk595xil65lmxz128ha7s3r2n5zknisddpgwnqrghs3igq"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-http-message perl-uri))
    (home-page "https://metacpan.org/release/HTTP-Parser")
    (synopsis "Parse HTTP/1.1 requests")
    (description "This is an HTTP request parser.  It takes chunks of text as
received and returns a @code{hint} as to what is required, or returns the
HTTP::Request when a complete request has been read.  HTTP/1.1 chunking is
supported.")
    (license license:perl-license)))

(define-public perl-http-parser-xs
  (package
    (name "perl-http-parser-xs")
    (version "0.17")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/K/KA/KAZUHO/"
                           "HTTP-Parser-XS-" version ".tar.gz"))
       (sha256
        (base32
         "02d84xq1mm53c7jl33qyb7v5w4372vydp74z6qj0vc96wcrnhkkr"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-install))
    (home-page "https://metacpan.org/release/HTTP-Parser-XS")
    (synopsis "Fast HTTP request parser")
    (description "HTTP::Parser::XS is a fast, primitive HTTP request/response
parser.")
    (license license:perl-license)))

(define-public perl-http-request-ascgi
  (package
    (name "perl-http-request-ascgi")
    (version "1.2")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/F/FL/FLORA/"
                           "HTTP-Request-AsCGI-" version ".tar.gz"))
       (sha256
        (base32
         "1smwmiarwcgq7vjdblnb6ldi2x1s5sk5p15p7xvm5byiqq3znnwl"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-class-accessor perl-http-message))
    (home-page "https://metacpan.org/release/HTTP-Request-AsCGI")
    (synopsis "Set up a CGI environment from an HTTP::Request")
    (description "This module provides a convenient way to set up a CGI
environment from an HTTP::Request.")
    (license license:perl-license)))

(define-public perl-http-server-simple
  (package
    (name "perl-http-server-simple")
    (version "0.52")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/B/BP/BPS/"
                           "HTTP-Server-Simple-" version ".tar.gz"))
       (sha256
        (base32
         "0k6bg7k6mjixfzxdkkdrhqvaqmdhjszx0zsk8g0bimiby6j9z4yq"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-cgi))
    (arguments
     ;; See the discussion of a related tests issue at
     ;; https://lists.gnu.org/archive/html/guix-devel/2015-01/msg00346.html
     `(#:tests? #f

       #:phases (modify-phases %standard-phases
                   (add-before 'configure 'set-search-path
                     (lambda _
                       ;; Work around "dotless @INC" build failure.
                       (setenv "PERL5LIB"
                               (string-append (getcwd) ":"
                                              (getenv "PERL5LIB")))
                       #t)))))
    (home-page "https://metacpan.org/release/HTTP-Server-Simple")
    (synopsis "Lightweight HTTP server")
    (description "HTTP::Server::Simple is a simple standalone HTTP daemon with
no non-core module dependencies.  It can be used for building a standalone
http-based UI to your existing tools.")
    (license license:perl-license)))

(define-public perl-http-tiny
  (package
    (name "perl-http-tiny")
    (version "0.076")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/D/DA/DAGOLDEN/"
                           "HTTP-Tiny-" version ".tar.gz"))
       (sha256
        (base32
         "11wkxxqj3ff84rgj9q2gzkdgscwp3fzj205846k9ycqinlpsmgfx"))))
    (build-system perl-build-system)
    (inputs
     (list perl-http-cookiejar perl-io-socket-ip perl-io-socket-ssl
           perl-mozilla-ca perl-net-ssleay))
    (home-page "https://metacpan.org/release/HTTP-Tiny")
    (synopsis "HTTP/1.1 client")
    (description "This is a very simple HTTP/1.1 client, designed for doing
simple requests without the overhead of a large framework like LWP::UserAgent.
It supports proxies and redirection.  It also correctly resumes after EINTR.")
    (license license:perl-license)))

(define-public perl-http-tinyish
  (package
    (name "perl-http-tinyish")
    (version "0.15")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "mirror://cpan/authors/id/M/MI/MIYAGAWA/HTTP-Tinyish-"
             version
             ".tar.gz"))
       (sha256
        (base32
         "199sa722amvwhq0czjfb7psj3hbqmvni5vxkrm579r5943pg0rax"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-file-which perl-ipc-run3))
    (home-page "https://metacpan.org/release/HTTP-Tinyish")
    (synopsis "@code{HTTP::Tiny} compatible HTTP client wrappers")
    (description
     "@code{HTTP::Tinyish} is a wrapper module for @acronym{LWP,libwww-perl},
@code{HTTP::Tiny}, curl and wget.

It provides an API compatible to HTTP::Tiny.")
    (license license:perl-license)))

(define-public perl-io-html
  (package
    (name "perl-io-html")
    (version "1.00")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "mirror://cpan/authors/id/C/CJ/CJM/IO-HTML-"
                   version ".tar.gz"))
             (sha256
              (base32
               "06nj3a0xgp5jxwxx6ayglfk2v7npf5a7gwkqsjlkapjkybarzqh4"))))
    (build-system perl-build-system)
    (license license:perl-license)
    (synopsis "Perl module to open an HTML file with automatic charset detection")
    (description
     "IO::HTML provides an easy way to open a file containing HTML while
automatically determining its encoding.  It uses the HTML5 encoding sniffing
algorithm specified in section 8.2.2.1 of the draft standard.")
    (home-page "https://metacpan.org/release/IO-HTML")))

(define-public perl-io-socket-ip
  (package
    (name "perl-io-socket-ip")
    (version "0.41")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/P/PE/PEVANS/"
                           "IO-Socket-IP-" version ".tar.gz"))
       (sha256
        (base32 "0ihlpxrkq1xrvhnq52nhghanskic718ch8kpp642afgq72i4b6l4"))))
    (build-system perl-build-system)
    (native-inputs (list perl-module-build))
    (home-page "https://metacpan.org/release/IO-Socket-IP")
    (synopsis "Family-neutral IP socket supporting both IPv4 and IPv6")
    (description "This module provides a protocol-independent way to use IPv4
and IPv6 sockets, intended as a replacement for IO::Socket::INET.")
    (license license:perl-license)))

(define-public perl-io-socket-ssl
  (package
    (name "perl-io-socket-ssl")
    (version "2.081")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://cpan/authors/id/S/SU/SULLR/"
                                  "IO-Socket-SSL-" version ".tar.gz"))
              (sha256
               (base32
                "0hw4c62abq0cs3ixi0ws96i2y0fij3452514dlqn7d6nm0kgig87"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-net-ssleay
           ;; for IDN support
           perl-uri))
    (synopsis "Nearly transparent SSL encapsulation for IO::Socket::INET")
    (description
     "IO::Socket::SSL makes using SSL/TLS much easier by wrapping the
necessary functionality into the familiar IO::Socket interface and providing
secure defaults whenever possible.  This way existing applications can be made
SSL-aware without much effort, at least if you do blocking I/O and don't use
select or poll.")
    (license license:perl-license)
    (home-page "https://github.com/noxxi/p5-io-socket-ssl")))

(define-public perl-libwww
  (package
    (name "perl-libwww")
    (version "6.67")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "mirror://cpan/authors/id/O/OA/OALDERS/libwww-perl-"
                   version ".tar.gz"))
             (sha256
              (base32
               "08xp4q90nkvpwnks2qfqjhqgff6447myayqi6kc1panh7w5c9vln"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-test-fatal perl-test-needs perl-test-requiresinternet))
    (propagated-inputs
     (list perl-encode-locale
           perl-file-listing
           perl-html-parser
           perl-http-cookies
           perl-http-daemon
           perl-http-date
           perl-http-message
           perl-http-negotiate
           perl-net-http
           perl-try-tiny
           perl-uri
           perl-www-robotrules))
    (license license:perl-license)
    (synopsis "Perl modules for the WWW")
    (description
     "The libwww-perl collection is a set of Perl modules which provides a
simple and consistent application programming interface to the
World-Wide Web.  The main focus of the library is to provide classes
and functions that allow you to write WWW clients.  The library also
contains modules that are of more general use and even classes that
help you implement simple HTTP servers.")
    (home-page "https://metacpan.org/release/libwww-perl")))

(define-public perl-lwp-online
  (package
    (name "perl-lwp-online")
    (version "1.08")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "mirror://cpan/authors/id/A/AD/ADAMK/LWP-Online-"
             version ".tar.gz"))
       (sha256
        (base32
         "176f6vbk1018i0y7xj9d406ndbjgwzan2j9nihxnsahzg2vr2vz2"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-libwww perl-uri))
    (native-inputs
     (list perl-module-install))
    (home-page "https://metacpan.org/release/LWP-Online")
    (synopsis "Checks whether your process has access to the web")
    (description "This module attempts to answer, as accurately as it can, one
of the nastiest technical questions there is: am I on the internet?

A host of networking and security issues make this problem very difficult.
There are firewalls, proxies (both well behaved and badly behaved).  We might
not have DNS.  We might not have a network card at all!")
    (license license:perl-license)))

(define-public perl-lwp-mediatypes
  (package
    (name "perl-lwp-mediatypes")
    (version "6.04")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "mirror://cpan/authors/id/O/OA/OALDERS/LWP-MediaTypes-"
                   version ".tar.gz"))
             (sha256
              (base32
               "1n8rg6csv3dsvymg06cmxipimr6cb1g9r903ghm1qsmiv89cl6wg"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-test-fatal))
    (license license:perl-license)
    (synopsis "Perl module to guess the media type for a file or a URL")
    (description
     "The LWP::MediaTypes module provides functions for handling media (also
known as MIME) types and encodings.  The mapping from file extensions to
media types is defined by the media.types file.  If the ~/.media.types file
exists it is used instead.")
    (home-page "https://metacpan.org/release/LWP-MediaTypes")))

(define-public perl-lwp-protocol-https
  (package
    (name "perl-lwp-protocol-https")
    (version "6.09")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/O/OA/OALDERS/"
                           "LWP-Protocol-https-" version ".tar.gz"))
       (sha256
        (base32 "14pm785cgyrnppks6ccasb2vkqifh0a8fz36nmnhc2v926jy3kqn"))))
    (build-system perl-build-system)
    (native-inputs
     ;; For tests.
     (list perl-test-requiresinternet))
    (propagated-inputs
     (list perl-io-socket-ssl perl-libwww perl-mozilla-ca perl-net-http))
    (home-page "https://metacpan.org/release/LWP-Protocol-https")
    (synopsis "HTTPS support for LWP::UserAgent")
    (description "The LWP::Protocol::https module provides support for using
https schemed URLs with LWP.")
    (license license:perl-license)))

(define-public perl-lwp-useragent-cached
  (package
    (name "perl-lwp-useragent-cached")
    (version "0.08")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/O/OL/OLEG/"
                           "LWP-UserAgent-Cached-" version ".tar.gz"))
       (sha256
        (base32
         "1hw7wy7f82kl61xjwkgmhv1ixgg56dhgfr45wxn6ahc0qys5mkix"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-libwww))
    (home-page "https://metacpan.org/release/LWP-UserAgent-Cached")
    (synopsis "Simple caching for LWP::UserAgent")
    (description "LWP::UserAgent::Cached is an LWP::UserAgent subclass with
cache support.  It returns responses from the local file system, if available,
instead of making an HTTP request.")
    (license license:perl-license)))

(define-public perl-lwp-useragent-determined
  (package
    (name "perl-lwp-useragent-determined")
    (version "1.07")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
                           "LWP-UserAgent-Determined-" version ".tar.gz"))
       (sha256
        (base32
         "0lyvbpjng7yfvyha9rp2y2c6liz5hhplmd2grc8jlsfkih7dbn06"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-libwww))
    (home-page "https://metacpan.org/release/LWP-UserAgent-Determined")
    (synopsis "Virtual browser that retries errors")
    (description "LWP::UserAgent::Determined works just like LWP::UserAgent,
except that when you use it to get a web page but run into a
possibly-temporary error (like a DNS lookup timeout), it'll wait a few seconds
and retry a few times.")
    (license license:perl-license)))

(define-public perl-lwpx-paranoidagent
  (package
    (name "perl-lwpx-paranoidagent")
    (version "1.12")
    (source
     (origin
      (method url-fetch)
      (uri (string-append
            "mirror://cpan/authors/id/S/SA/SAXJAZMAN/lwp/LWPx-ParanoidAgent-"
            version ".tar.gz"))
      (sha256
       (base32
        "0gfhw3jbs25yya2dryv8xvyn9myngcfcmsybj7gkq62fnznil16c"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-libwww
           ;; Users should instead make sure SSL_ca_path is set properly.
           ;; ("perl-mozilla-ca" ,perl-mozilla-ca)
           perl-net-dns))
    (home-page "https://metacpan.org/release/LWPx-ParanoidAgent")
    (synopsis "Security enhanced subclass of LWP::UserAgent")
    (description "@code{LWPx::ParanoidAgent} is a class subclassing
@code{LWP::UserAgent} but paranoid against attackers.  Its purpose is
to vet requests for a remote resource on behalf of a possibly
malicious user.  The class can do the same as @code{LWP::UserAgent},
except that proxy support has been removed.  Support for URI schemes
is limited to http and https.")
    (license license:perl-license)))

(define-public perl-net-amazon-s3
  (package
    (name "perl-net-amazon-s3")
    (version "0.60")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/P/PF/PFIG/"
                           "Net-Amazon-S3-" version ".tar.gz"))
       (sha256
        (base32
         "10dcsq4s2kc9cb1vccx17r187c81drirc3s1hbxh3rb8489kg2b2"))
       (patches (search-patches
                 "perl-net-amazon-s3-moose-warning.patch"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-libwww perl-test-exception))
    (propagated-inputs
     (list perl-data-stream-bulk
           perl-datetime-format-http
           perl-digest-hmac
           perl-digest-md5-file
           perl-file-find-rule
           perl-http-date
           perl-http-message
           perl-lwp-useragent-determined
           perl-mime-types
           perl-moose
           perl-moosex-strictconstructor
           perl-moosex-types-datetime-morecoercions
           perl-path-class
           perl-regexp-common
           perl-term-encoding
           perl-term-progressbar-simple
           perl-uri
           perl-xml-libxml))
    (home-page "https://metacpan.org/release/Net-Amazon-S3")
    (synopsis "Perl interface to Amazon S3")
    (description "This module provides a Perlish interface to Amazon S3.")
    (license license:perl-license)))

(define-public perl-net-http
  (package
    (name "perl-net-http")
    (version "6.22")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "mirror://cpan/authors/id/O/OA/OALDERS/"
                   "Net-HTTP-" version ".tar.gz"))
             (sha256
              (base32
               "18m1b1274wmsl3cdfwg27pm7s1fgrrlhwy4gw4zl8da2p2jzkyk2"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-io-socket-ssl perl-uri))
    (license license:perl-license)
    (synopsis "Perl low-level HTTP connection (client)")
    (description
     "The Net::HTTP class is a low-level HTTP client.  An instance of the
Net::HTTP class represents a connection to an HTTP server.  The HTTP protocol
is described in RFC 2616.  The Net::HTTP class supports HTTP/1.0 and
HTTP/1.1.")
    (home-page "https://metacpan.org/release/Net-HTTP")))

(define-public perl-net-server
  (package
    (name "perl-net-server")
    (version "2.009")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/R/RH/RHANDOM/"
                           "Net-Server-" version ".tar.gz"))
       (sha256
        (base32
         "0gw1k9gcw7habbkxvsfa2gz34brlbwcidk6khgsf1qjm0dbccrw2"))))
    (build-system perl-build-system)
    (home-page "https://metacpan.org/release/Net-Server")
    (synopsis "Extensible Perl server engine")
    (description "Net::Server is an extensible, generic Perl server engine.
It attempts to be a generic server as in Net::Daemon and NetServer::Generic.
It includes with it the ability to run as an inetd
process (Net::Server::INET), a single connection server (Net::Server or
Net::Server::Single), a forking server (Net::Server::Fork), a preforking
server which maintains a constant number of preforked
children (Net::Server::PreForkSimple), or as a managed preforking server which
maintains the number of children based on server load (Net::Server::PreFork).
In all but the inetd type, the server provides the ability to connect to one
or to multiple server ports.")
    (license license:perl-license)))

(define-public perl-net-smtp-ssl
  (package
    (name "perl-net-smtp-ssl")
    (version "1.04")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
                           "Net-SMTP-SSL-" version ".tar.gz"))
       (sha256
        (base32
         "001a6dcfahf7kkyirqkc8jd4fh4fkal7n7vm9c4dblqrvmdc8abv"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-io-socket-ssl))
    (home-page "https://metacpan.org/release/Net-SMTP-SSL")
    (synopsis "SSL support for Net::SMTP")
    (description "SSL support for Net::SMTP.")
    (license license:perl-license)))

(define-public perl-plack
  (package
    (name "perl-plack")
    (version "1.0033")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
                           "Plack-" version ".tar.gz"))
       (sha256
        (base32
         "081jg0xddzpg2anmqi9i6d7vs6c8z7k557bf8xl6vgb3h95pin5w"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-test-requires perl-file-sharedir-install))
    (propagated-inputs
     (list perl-apache-logformat-compiler
           perl-devel-stacktrace
           perl-devel-stacktrace-ashtml
           perl-file-sharedir
           perl-hash-multivalue
           perl-http-body
           perl-http-message
           perl-http-tiny
           perl-libwww
           perl-stream-buffered
           perl-test-tcp
           perl-try-tiny
           perl-uri))
    (home-page "https://metacpan.org/release/Plack")
    (synopsis "Perl Superglue for Web frameworks and servers (PSGI toolkit)")
    (description "Plack is a set of tools for using the PSGI stack.  It
contains middleware components, a reference server, and utilities for Web
application frameworks.  Plack is like Ruby's Rack or Python's Paste for
WSGI.")
    (license license:perl-license)))

(define-public perl-plack-middleware-deflater
  (package
    (name "perl-plack-middleware-deflater")
    (version "0.12")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "mirror://cpan/authors/id/K/KA/KAZEBURO/"
             "Plack-Middleware-Deflater-" version ".tar.gz"))
       (sha256
        (base32
         "0xf2visi16hgwgyp9q0cjr10ikbn474hjia5mj8mb2scvbkrbni8"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-install perl-test-requires))
    (propagated-inputs
     (list perl-plack))
    (home-page "https://metacpan.org/release/Plack-Middleware-Deflater")
    (synopsis "Compress response body with Gzip or Deflate")
    (description
     "Plack::Middleware::Deflater is a middleware to encode your response body
in gzip or deflate, based on \"Accept-Encoding\" HTTP request header.  It
would save the bandwidth a little bit but should increase the Plack server
load, so ideally you should handle this on the frontend reverse proxy
servers.")
    (license license:perl-license)))

(define-public perl-plack-middleware-fixmissingbodyinredirect
  (package
    (name "perl-plack-middleware-fixmissingbodyinredirect")
    (version "0.12")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/S/SW/SWEETKID/"
                           "Plack-Middleware-FixMissingBodyInRedirect-"
                           version ".tar.gz"))
       (sha256
        (base32
         "14dkrmccq7a5vpymx5dv8032gfcvhsw2i6v5sh3c4ym5ymlx08kc"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-html-parser ;for HTML::Entities
           perl-http-message perl-plack))     ;for Plack::Test
    (home-page
     "https://metacpan.org/release/Plack-Middleware-FixMissingBodyInRedirect")
    (synopsis "Plack::Middleware which sets body for redirect response")
    (description "This module sets the body in redirect response, if it's not
already set.")
    (license license:perl-license)))

(define-public perl-plack-middleware-methodoverride
  (package
    (name "perl-plack-middleware-methodoverride")
    (version "0.20")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
                           "Plack-Middleware-MethodOverride-"
                           version ".tar.gz"))
       (sha256
        (base32 "1wdmmav3rbhv49zpw311zrxxqmg1fz3f3q9src0ypgs8zcp5myyv"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-build))
    (propagated-inputs
     (list perl-plack))
    (home-page "https://metacpan.org/release/Plack-Middleware-MethodOverride")
    (synopsis "Override REST methods to Plack apps via POST")
    (description "This middleware allows for POST requests that pretend to be
something else: by adding either a header named X-HTTP-Method-Override to the
request, or a query parameter named x-tunneled-method to the URI, the client
can say what method it actually meant.")
    (license license:perl-license)))

(define-public perl-plack-middleware-removeredundantbody
  (package
    (name "perl-plack-middleware-removeredundantbody")
    (version "0.09")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/S/SW/SWEETKID/"
                           "Plack-Middleware-RemoveRedundantBody-"
                           version ".tar.gz"))
       (sha256
        (base32 "0zh83001rn5aqwpc1pn3di2h3ibzlf2dvkmkv05hnadpss9mzm40"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-plack))
    (home-page
     "https://metacpan.org/release/Plack-Middleware-RemoveRedundantBody")
    (synopsis "Plack::Middleware which removes body for HTTP response")
    (description "This module removes the body in an HTTP response if it's not
required.")
    (license license:perl-license)))

(define-public perl-plack-middleware-reverseproxy
  (package
    (name "perl-plack-middleware-reverseproxy")
    (version "0.16")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
                           "Plack-Middleware-ReverseProxy-"
                           version ".tar.gz"))
       (sha256
        (base32 "0a512n62pnk5ayj3zdzyj50iy1qi8nwh6ygks2h7nrh7gp9k2jc7"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-install))
    (propagated-inputs
     (list perl-plack))
    (home-page "https://metacpan.org/release/Plack-Middleware-ReverseProxy")
    (synopsis "Supports app to run as a reverse proxy backend")
    (description "Plack::Middleware::ReverseProxy resets some HTTP headers,
which are changed by reverse-proxy.  You can specify the reverse proxy address
and stop fake requests using @code{enable_if} directive in your app.psgi.")
    (license license:perl-license)))

(define-public perl-plack-test-externalserver
  (package
    (name "perl-plack-test-externalserver")
    (version "0.02")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/E/ET/ETHER/"
                           "Plack-Test-ExternalServer-" version ".tar.gz"))
       (sha256
        (base32 "1l1yj1l25679x7cbpd27ii7s1f1ajpkspif9xqnl21hczrbmrbsv"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-plack))
    (home-page "https://metacpan.org/release/Plack-Test-ExternalServer")
    (synopsis "Run HTTP tests on external live servers")
    (description "This module allows your to run your Plack::Test tests
against an external server instead of just against a local application through
either mocked HTTP or a locally spawned server.")
    (license license:perl-license)))

(define-public perl-test-tcp
  (package
    (name "perl-test-tcp")
    (version "2.22")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
                           "Test-TCP-" version ".tar.gz"))
       (sha256
        (base32 "0mvv9rqwrwlcfh8qrs0s47p85rhlnw15d4gbpyi802bddp0c6lry"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-test-sharedfork))
    (arguments `(#:tests? #f))          ;related to signaling in t/05_sigint.t
    (home-page "https://metacpan.org/release/Test-TCP")
    (synopsis "Testing TCP programs")
    (description "Test::TCP is test utilities for TCP/IP programs.")
    (license license:perl-license)))

(define-public perl-test-www-mechanize
  (package
    (name "perl-test-www-mechanize")
    (version "1.52")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/P/PE/PETDANCE/"
                           "Test-WWW-Mechanize-" version ".tar.gz"))
       (sha256
        (base32 "1jsywlbxhqw39ij7s8vmgff5vys58vlfaq27072awacnxc65aal4"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-carp-assert-more
           perl-html-form
           perl-html-lint
           perl-http-server-simple
           perl-libwww
           perl-test-longstring
           perl-www-mechanize))
    (home-page "https://metacpan.org/release/Test-WWW-Mechanize")
    (synopsis "Testing-specific WWW::Mechanize subclass")
    (description "Test::WWW::Mechanize is a subclass of the Perl module
WWW::Mechanize that incorporates features for web application testing.")
    (license license:artistic2.0)))

(define-public perl-test-www-mechanize-catalyst
  (package
    (name "perl-test-www-mechanize-catalyst")
    (version "0.62")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/M/MS/MSTROUT/"
                           "Test-WWW-Mechanize-Catalyst-" version ".tar.gz"))
       (sha256
        (base32 "1cdc2q16vs6fb335pzaislz2rx1ph9acaxyp7v5hv9xbwwddwfqq"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-catalyst-plugin-session
           perl-catalyst-plugin-session-state-cookie
           perl-module-install
           perl-test-exception
           perl-test-pod
           perl-test-utf8))
    (propagated-inputs
     (list perl-catalyst-runtime
           perl-class-load
           perl-libwww
           perl-moose
           perl-namespace-clean
           perl-test-www-mechanize
           perl-www-mechanize))
    (home-page "https://metacpan.org/release/Test-WWW-Mechanize-Catalyst")
    (synopsis "Test::WWW::Mechanize for Catalyst")
    (description "The Test::WWW::Mechanize::Catalyst module meshes the
Test::WWW:Mechanize module and the Catalyst web application framework to allow
testing of Catalyst applications without needing to start up a web server.")
    (license license:perl-license)))

(define-public perl-test-www-mechanize-psgi
  (package
    (name "perl-test-www-mechanize-psgi")
    (version "0.38")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/O/OA/OALDERS/"
                           "Test-WWW-Mechanize-PSGI-" version ".tar.gz"))
       (sha256
        (base32
         "0fsh2i05kf1kfavv2r9kmnjl7qlyqrd11ikc0qcqzzxsqzzjkg9r"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-test-pod))
    (propagated-inputs
     (list perl-plack perl-test-www-mechanize))
    (home-page "https://metacpan.org/release/Test-WWW-Mechanize-PSGI")
    (synopsis "Test PSGI programs using WWW::Mechanize")
    (description "PSGI is a specification to decouple web server environments
from web application framework code.  Test::WWW::Mechanize is a subclass of
WWW::Mechanize that incorporates features for web application testing.  The
Test::WWW::Mechanize::PSGI module meshes the two to allow easy testing of PSGI
applications.")
    (license license:perl-license)))

(define-public perl-uri
  (package
    (name "perl-uri")
    (version "5.05")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://cpan/authors/id/O/OA/OALDERS/"
                                 "URI-" version ".tar.gz"))
             (sha256
              (base32
               "1v3r3ck67w272kzfgm1nd3wb41av1hlnza56vkxxj1i7s3917hd5"))))
    (build-system perl-build-system)
    (native-inputs
     ;; For tests.
     (list perl-test-needs))
    (license license:perl-license)
    (synopsis "Perl Uniform Resource Identifiers (absolute and relative)")
    (description
     "The URI module implements the URI class.  Objects of this class
represent \"Uniform Resource Identifier references\" as specified in RFC 2396
and updated by RFC 2732.")
    (home-page "https://metacpan.org/release/URI")))

(define-public perl-uri-fetch
  (package
    (name "perl-uri-fetch")
    (version "0.15")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://cpan/authors/id/N/NE/NEILB/"
                                  "URI-Fetch-" version ".tar.gz"))
              (sha256
               (base32
                "0355rnw3xbgfwy9fgs6zrjmrsychzmwpkc9jcd9mrbkd9kr3k7rp"))))
    (build-system perl-build-system)
    (arguments
     `(#:tests? #f)) ; Tests require internet connection to succeed
    (inputs
     (list perl-class-errorhandler perl-libwww perl-uri))
    (home-page "https://metacpan.org/release/URI-Fetch")
    (synopsis "Smart URI fetching/caching")
    (description "@code{URI::Fetch} is a smart client for fetching HTTP pages,
notably syndication feeds (RSS, Atom, and others), in an intelligent, bandwidth-
and time-saving way.")
    (license license:perl-license)))

(define-public perl-uri-find
  (package
    (name "perl-uri-find")
    (version "20160806")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/M/MS/MSCHWERN/"
                           "URI-Find-" version ".tar.gz"))
       (sha256
        (base32
         "1mk3jv8x0mcq3ajrn9garnxd0jc7sw4pkwqi88r5apqvlljs84z2"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-module-build))
    (propagated-inputs
     (list perl-uri))
    (home-page "https://metacpan.org/release/URI-Find")
    (synopsis "Find URIs in arbitrary text")
    (description "This module finds URIs and URLs (according to what URI.pm
considers a URI) in plain text.  It only finds URIs which include a
scheme (http:// or the like), for something a bit less strict, consider
URI::Find::Schemeless.  For a command-line interface, urifind is provided.")
    (license license:perl-license)))

(define-public perl-uri-ws
  (package
    (name "perl-uri-ws")
    (version "0.03")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/P/PL/PLICEASE/"
                           "URI-ws-" version ".tar.gz"))
       (sha256
        (base32
         "1vs1wm80sq685944g1l4a0fxcbccc00c0f9648yabdmcf90hwsvf"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-uri))
    (home-page "https://metacpan.org/release/URI-ws")
    (synopsis "WebSocket support for URI package")
    (description "With this module, the URI package provides the same set of
methods for WebSocket URIs as it does for HTTP URIs.")
    (license license:perl-license)))

(define-public perl-web-scraper
  (package
    (name "perl-web-scraper")
    (version "0.38")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/Web-Scraper-"
             version ".tar.gz"))
       (sha256
        (base32 "1gs3fmbc83j34c0sig1hkpnm26ngnyi5kgq5dl8vxvkzimgnwnzr"))))
    (build-system perl-build-system)
    (native-inputs (list perl-module-build-tiny
                         perl-test-base
                         perl-test-requires))
    (propagated-inputs (list perl-html-parser
                             perl-html-selector-xpath
                             perl-html-tagset
                             perl-html-tree
                             perl-html-treebuilder-xpath
                             perl-libwww
                             perl-universal-require
                             perl-uri
                             perl-xml-xpathengine
                             perl-yaml))
    (home-page "https://metacpan.org/release/Web-Scraper")
    (synopsis
     "Web Scraping toolkit using HTML and CSS Selectors or XPath expressions")
    (description "Perl module @code{Web::Scraper} is a toolkit for
traversing and scraping sites, inspired by Ruby's Scapi.")
    (license license:perl-license)))

(define-public perl-uri-template
  (package
    (name "perl-uri-template")
    (version "0.24")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://cpan/authors/id/B/BR/BRICAS/URI-Template-"
                                  version ".tar.gz"))
              (sha256
               (base32
                "1phibcmam2hklrddzj79l43va1gcqpyszbw21ynxq53ynmhjvbk8"))))
    (build-system perl-build-system)
    (inputs
     (list perl-uri))
    (native-inputs
     (list perl-test-pod-coverage perl-test-pod perl-module-install
           perl-json))
    (home-page "https://metacpan.org/release/URI-Template")
    (synopsis "Object for handling URI templates")
    (description "This perl module provides a wrapper around URI templates as described in
RFC 6570.")
    (license license:perl-license)))

(define-public perl-www-curl
  (package
    (name "perl-www-curl")
    (version "4.17")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "mirror://cpan/authors/id/S/SZ/SZBALINT/WWW-Curl-"
                    version".tar.gz"))
              (patches (search-patches "perl-www-curl-fix-struct-void.patch"
                                       "perl-www-curl-remove-symbol.patch"))
              (sha256
               (base32
                "1fmp9aib1kaps9vhs4dwxn7b15kgnlz9f714bxvqsd1j1q8spzsj"))))
    (build-system perl-build-system)
    (arguments
     '(#:tests? #f                          ;XXX: tests require network access
       #:phases (modify-phases %standard-phases
                   (add-before 'configure 'set-search-path
                     (lambda _
                       ;; Work around "dotless @INC" build failure.
                       (setenv "PERL5LIB"
                               (string-append (getcwd) ":"
                                              (getenv "PERL5LIB")))
                       #t)))))
    (native-inputs
     (list perl-module-install))
    (inputs (list curl))
    (synopsis "Perl extension interface for libcurl")
    (description
     "This is a Perl extension interface for the libcurl file downloading
library.")
    (license license:perl-license)
    (home-page "https://metacpan.org/release/WWW-Curl")))

(define-public perl-www-mechanize
  (package
    (name "perl-www-mechanize")
    (version "1.91")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/O/OA/OALDERS/"
                           "WWW-Mechanize-" version ".tar.gz"))
       (sha256
        (base32 "0cb14m1vhaf0mgn2fqwi5hm72xhfi77hpq2g57swgy0w83x7m27b"))))
    (build-system perl-build-system)
    (native-inputs                      ;only for tests
     (list perl-cgi perl-test-deep perl-test-fatal perl-test-output
           perl-test-warnings))
    (propagated-inputs
     (list perl-html-form
           perl-html-parser
           perl-html-tree
           perl-http-message
           perl-http-server-simple
           perl-libwww
           perl-test-warn
           perl-uri))
    (home-page "https://metacpan.org/release/WWW-Mechanize")
    (synopsis "Web browsing in a Perl object")
    (description "WWW::Mechanize is a Perl module for stateful programmatic
web browsing, used for automating interaction with websites.")
    (license license:perl-license)))

(define-public perl-www-opensearch
  (package
    (name "perl-www-opensearch")
    (version "0.17")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://cpan/authors/id/B/BR/BRICAS/"
                                  "WWW-OpenSearch-" version ".tar.gz"))
              (sha256
               (base32
                "1yxplx1q1qk2fvnzqrbk01lz26fy1lyhay51a3ky7q3jgh9p01rb"))))
    (build-system perl-build-system)
    (native-inputs
     (list perl-class-errorhandler
           perl-datetime
           perl-datetime-format-mail
           perl-datetime-format-w3cdtf
           perl-feed-find
           perl-module-install
           perl-module-pluggable
           perl-uri-fetch
           perl-test-simple
           perl-xml-atom
           perl-xml-rss))
    (inputs
     (list perl-data-page
           perl-libwww
           perl-uri
           perl-uri-template
           perl-xml-feed
           perl-xml-libxml))
    (home-page "https://metacpan.org/release/WWW-OpenSearch")
    (synopsis "Search A9 OpenSearch compatible engines")
    (description
     "@code{WWW::OpenSearch} is a module to search @url{A9's OpenSearch,
http://opensearch.a9.com} compatible search engines.")
    (license license:perl-license)))

(define-public perl-www-robotrules
  (package
    (name "perl-www-robotrules")
    (version "6.02")
    (source (origin
             (method url-fetch)
             (uri (string-append
                   "mirror://cpan/authors/id/G/GA/GAAS/WWW-RobotRules-"
                   version ".tar.gz"))
             (sha256
              (base32
               "07m50dp5n5jxv3m93i55qvnd67a6g7cvbvlik115kmc8lbkh5da6"))))
    (build-system perl-build-system)
    (propagated-inputs
     (list perl-uri))
    (license license:perl-license)
    (synopsis "Perl database of robots.txt-derived permissions")
    (description
     "The WWW::RobotRules module parses /robots.txt files as specified in
\"A Standard for Robot Exclusion\", at
<http://www.robotstxt.org/wc/norobots.html>.  Webmasters can use the
/robots.txt file to forbid conforming robots from accessing parts of
their web site.")
    (home-page "https://metacpan.org/release/WWW-RobotRules")))

(define-public python-lambda-4dn
  (package
    (name "python-lambda-4dn")
    (version "0.12.3")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "python-lambda-4dn" version))
              (sha256
               (base32
                "1p5i8wsi8q5fpq63i7n7ri1w1lnh4gpn17f88vhkbh14aah5wxj1"))))
    (properties '(("upstream-name" . "python-lambda-4dn")))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'fix-pip-install
            (lambda _
              (substitute* "aws_lambda/aws_lambda.py"
                ;; This package uses pip to install Python packages, wrap them
                ;; up, and push them to AWS Lambda.  We need to reset
                ;; GUIX_PYTHONPATH to avoid introducing package conflicts that
                ;; would cause pip to fail.
                (("(subprocess.call\\(\\[sys.executable.*'--no-cache-dir'\\])\\)" _ m)
                 (string-append m ", env={\"GUIX_PYTHONPATH\":\""
                                #$(this-package-input "python")
                                "/lib/python"
                                #$(version-major+minor
                                   (package-version (this-package-input "python")))
                                "/site-packages/\"})"))
                ;; Zipfile uses the mtime of the temporary directory to build
                ;; a zip file.  But the temp directory has a timestamp of 0,
                ;; and zipfile refuses to build a zip archive dated before
                ;; 1980.  So we reset the mtime of all temp files before they
                ;; are added to the zip archive.
                (("^( +)arcname = os.path.join" line indent)
                 (string-append indent
                                "os.utime(os.path.join(root, file), (315619200, 315619200))\n"
                                line))))))))
    (inputs (list python))
    (propagated-inputs
     (list python-boto3
           python-botocore
           python-docutils
           python-six
           python-virtualenv))
    (home-page "https://github.com/4dn-dcic/python-lambda")
    (synopsis
     "Toolkit for developing and deploying Python code in AWS Lambda")
    (description
     "This is a toolset for developing and deploying serverless Python code in
AWS Lambda.  This is a fork of Nick Ficano's Python-lambda package.  It is
frozen for the needs of projects at the 4D Nucleome Data Coordination and
Integration Center (4DN-DCIC).")
    (license (list license:isc license:expat))))

(define-public python-feedparser
  (package
    (name "python-feedparser")
    (version "6.0.10")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "feedparser" version ".tar.gz"))
       (sha256
        (base32 "0lfa1c8s6abnlksbwxdpq78bg4rb6603mcgarmip3kip8rglini7"))
       (patches (search-patches "python-feedparser-missing-import.patch"))))
    (build-system python-build-system)
    (propagated-inputs
     (list python-sgmllib3k))
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (replace 'check
           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
             (when tests?
               (add-installed-pythonpath inputs outputs)
               (invoke "python" "tests/runtests.py")))))))
    (home-page "https://github.com/kurtmckee/feedparser")
    (synopsis "Parse feeds in Python")
    (description
     "Universal feed parser which handles RSS 0.9x, RSS 1.0, RSS 2.0,
CDF, Atom 0.3, and Atom 1.0 feeds.")
    (license (list license:bsd-2           ; source code
                   license:freebsd-doc)))) ; documentation

(define-public python-tibanna
  (package
    (name "python-tibanna")
    (version "4.0.0")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "tibanna" version))
              (sha256
               (base32
                "185jr5b1dfgh82xcjal0y9wbzds37s0yhx0hp8awlvw26v72awv2"))))
    (build-system pyproject-build-system)
    (arguments
     ;; Tests require AWS credentials and access to the internet.
     (list #:tests? #false))
    (propagated-inputs
     (list python-benchmark-4dn
           python-boto3 python-botocore
           python-lambda-4dn python-tomlkit))
    (native-inputs
     (list python-poetry-core
           python-pytest
           python-pytest-cov
           python-pytest-mock))
    (home-page "https://github.com/4dn-dcic/tibanna")
    (synopsis "Tibanna runs portable workflows on the AWS Cloud")
    (description
     "Tibanna runs portable pipelines (in CWL/WDL and Snakemake) on the AWS
Cloud.")
    (license license:expat)))

(define-public guix-data-service
  (let ((commit "a204bda36d0433b5835375cbdc9e640a2a196674")
        (revision "54"))
    (package
      (name "guix-data-service")
      (version (string-append "0.0.1-" revision "." (string-take commit 7)))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://git.savannah.gnu.org/git/guix/data-service.git/")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "0f86sxxm0gnbkkb3x0kzrf9ld561y3mch4nkjylbmqdihh0609f0"))))
      (build-system gnu-build-system)
      (arguments
       (list
        #:modules '((guix build utils)
                    (guix build gnu-build-system)
                    (ice-9 ftw)
                    (ice-9 match)
                    (ice-9 rdelim)
                    (ice-9 popen))
        #:test-target "check-with-tmp-database"
        #:phases
        #~(modify-phases %standard-phases
            (add-before 'build 'set-GUILE_AUTO_COMPILE
              (lambda _
                ;; To avoid warnings relating to 'guild'.
                (setenv "GUILE_AUTO_COMPILE" "0")))
            (add-after 'install 'wrap-executable
              (lambda* (#:key inputs outputs #:allow-other-keys)
                (let* ((out (assoc-ref outputs "out"))
                       (bin (string-append out "/bin"))
                       (guile (assoc-ref inputs "guile"))
                       (guile-effective-version
                        (read-line
                         (open-pipe* OPEN_READ
                                     (string-append guile "/bin/guile")
                                     "-c" "(display (effective-version))")))
                       (scm (string-append out "/share/guile/site/"
                                           guile-effective-version))
                       (go  (string-append out "/lib/guile/"
                                           guile-effective-version
                                           "/site-ccache")))
                  (for-each
                   (lambda (file)
                     (simple-format (current-error-port)
                                    "wrapping: ~A\n"
                                    (string-append bin "/" file))
                     (wrap-program (string-append bin "/" file)
                       `("PATH" ":" prefix
                         ,(cons*
                           bin
                           (map (lambda (input)
                                  (string-append
                                   (assoc-ref inputs input)
                                   "/bin"))
                                '("ephemeralpg"
                                  "util-linux"
                                  "postgresql"))))
                       `("GUILE_LOAD_PATH" ":" prefix
                         (,scm ,(getenv "GUILE_LOAD_PATH")))
                       `("GUILE_LOAD_COMPILED_PATH" ":" prefix
                         (,go ,(getenv "GUILE_LOAD_COMPILED_PATH")))))
                   (scandir bin
                            (match-lambda
                              ((or "." "..") #f)
                              (_ #t)))))))
            (delete 'strip))))          ; As the .go files aren't compatible
      (inputs
       (list ephemeralpg
             util-linux
             postgresql-13
             sqitch
             bash-minimal))
      (propagated-inputs
       (list guix
             guile-fibers
             guile-json-4
             guile-email
             guile-prometheus
             guile-squee))
      (native-inputs
       (list (car (assoc-ref (package-native-inputs guix) "guile"))
             autoconf
             automake
             emacs-minimal
             emacs-htmlize
             pkg-config))
      (synopsis "Store and provide data about GNU Guix")
      (description
       "The Guix Data Service stores data about GNU Guix, and provides this
through a web interface.  It supports listening to the guix-commits mailing
list to find out about new revisions, then loads the data from these in to a
PostgreSQL database.")
      (home-page "https://data.guix.gnu.org/")
      (license license:agpl3+))))

(define-public gumbo-parser
  (package
    (name "gumbo-parser")
    (version "0.10.1")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                     (url "https://github.com/google/gumbo-parser")
                     (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0xslckwdh2i0g2qjsb6rnm8mjmbagvziz0hjlf7d1lbljfms1iw1"))))
    (build-system gnu-build-system)
    (arguments
     `(#:tests? #f))         ;tests require bundling googletest sources
    ;; The release tarball lacks the generated files.
    (native-inputs
     (list autoconf automake libtool))
    (home-page "https://github.com/google/gumbo-parser")
    (synopsis "HTML5 parsing library")
    (description
     "Gumbo is an implementation of the HTML5 parsing algorithm implemented as
a pure C99 library.")
    (license license:asl2.0)))

(define-public uwsgi
  (package
    (name "uwsgi")
    (version "2.0.18")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://projects.unbit.it/downloads/uwsgi-"
                                  version ".tar.gz"))
              (sha256
               (base32
                "10zmk4npknigmbqcq1wmhd461dk93159px172112vyq0i19sqwj9"))))
    (build-system gnu-build-system)
    (outputs '("out" "python"))
    (arguments
     '(;; XXX: The 'check' target runs cppcheck to do static code analysis.
       ;;      But there is no obvious way to run the real tests.
       #:tests? #f
       #:phases
       (modify-phases %standard-phases
         (replace 'configure
           ;; Configuration is done by writing an ini file.
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out       (assoc-ref outputs "out"))
                    (bindir    (string-append out "/bin"))
                    (plugindir (string-append out "/lib/uwsgi")))
               ;; The build phase outputs files to these directories directly.
               (mkdir-p bindir)
               (mkdir-p plugindir)
               ;; XXX: Enable other plugins.
               (call-with-output-file "buildconf/guix.ini"
                 (lambda (port)
                   (format port "[uwsgi]
yaml = libyaml
bin_name = ~a/uwsgi
plugin_dir = ~a

inherit = base
plugins = cgi,python
embedded_plugins =
" bindir plugindir))))
             (setenv "PROFILE" "guix")
             #t))
         (replace 'install
           ;; Move plugins into their own output.
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out           (assoc-ref outputs "out"))
                    (plugindir     (string-append out "/lib/uwsgi"))
                    (python-plugin (string-append
                                    plugindir "/python_plugin.so")))
               (install-file python-plugin
                             (string-append
                              (assoc-ref outputs "python") "/lib/uwsgi"))
               (delete-file python-plugin)
               #t))))))
    (native-inputs
     `(("pkg-config" ,pkg-config)
       ("python" ,python-wrapper)))
    (inputs
     (list jansson
           libxml2
           libyaml
           openssl
           pcre
           zlib
           ;; For plugins.
           python))
    (home-page "https://uwsgi-docs.readthedocs.org/")
    (synopsis "Application container server")
    (description
     "uWSGI presents a complete stack for networked/clustered web applications,
implementing message/object passing, caching, RPC and process management.
It uses the uwsgi protocol for all the networking/interprocess communications.")
    (license license:gpl2+))) ; with linking exception

(define-public jq
  (package
    (name "jq")
    (version "1.7.1")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://github.com/jqlang/jq"
                           "/releases/download/jq-" version
                           "/jq-" version ".tar.gz"))
       (sha256
        (base32 "1hl0wppdwwrqf3gzg3xwc260s7i1br2lnc97zr1k8bpx56hrr327"))
       (modules '((guix build utils)))
       (snippet
        ;; Remove bundled onigurama.
        '(delete-file-recursively "modules"))))
    (inputs
     (list oniguruma))
    (native-inputs
     (append
       ;; TODO: fix gems to generate documentation
       ;(list ruby bundler)
       '()
       (if (member (%current-system)
                   (package-supported-systems valgrind))
         (list valgrind)
         '())))
    (build-system gnu-build-system)
    (home-page "https://jqlang.github.io/jq/")
    (synopsis "Command-line JSON processor")
    (description "jq is like sed for JSON data – you can use it to slice and
filter and map and transform structured data with the same ease that sed, awk,
grep and friends let you play with text.  It is written in portable C.  jq can
mangle the data format that you have into the one that you want with very
little effort, and the program to do so is often shorter and simpler than
you'd expect.")
    (license (list license:expat license:cc-by3.0))))

(define-public go-github-com-mikefarah-yq-v4
  (package
    (name "go-github-com-mikefarah-yq-v4")
    (version "4.44.3")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/mikefarah/yq")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0s7c8r6y5jv6wda2v3k47hawfdr9j3rwk717l6byvh5qsbbml0vd"))))
    (build-system go-build-system)
    (arguments
     (list #:import-path "github.com/mikefarah/yq/v4"
           #:phases
           #~(modify-phases %standard-phases
               (add-after 'install 'remove-binary
                 (lambda _
                   (delete-file-recursively
                    (string-append #$output "/bin")))))))
    (propagated-inputs
     (list go-github-com-a8m-envsubst
           go-github-com-alecthomas-participle-v2
           go-github-com-alecthomas-repr
           go-github-com-dimchansky-utfbom
           go-github-com-elliotchance-orderedmap
           go-github-com-fatih-color
           go-github-com-goccy-go-json
           go-github-com-goccy-go-yaml
           go-github-com-jinzhu-copier
           go-github-com-magiconair-properties
           go-github-com-pelletier-go-toml-v2
           go-github-com-pkg-diff
           go-github-com-spf13-cobra
           go-github-com-spf13-pflag
           go-github-com-yuin-gopher-lua
           go-golang-org-x-net
           go-golang-org-x-text
           go-gopkg-in-op-go-logging-v1
           go-gopkg-in-yaml-v3))
    (home-page "https://mikefarah.gitbook.io/yq/")
    (synopsis
     "Command-line YAML, JSON, XML, CSV, TOML and properties processor")
    (description
     "This package provides @code{yq}, a command-line YAML, JSON and XML
processor.  It uses @code{jq}-like syntax but works with YAML files as well as
JSON, XML, properties, CSV and TSV.")
    (license license:expat)))

(define-public yq
  (package
    (inherit go-github-com-mikefarah-yq-v4)
    (name "yq")
    (arguments
     (list #:install-source? #f
           #:import-path "github.com/mikefarah/yq/v4"
           #:phases
           #~(modify-phases %standard-phases
               (add-after 'install 'rename-binary
                 (lambda _
                   (rename-file (string-append #$output "/bin/v4")
                                (string-append #$output "/bin/yq")))))))
    (propagated-inputs '())
    (inputs (package-propagated-inputs go-github-com-mikefarah-yq-v4))))

(define-public go-github-com-itchyny-gojq
  (package
    (name "go-github-com-itchyny-gojq")
    (version "0.12.16")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/itchyny/gojq")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0favs281iaq98cmqwf47amk12xpksznpwgfid24z8migkp8628wl"))))
    (build-system go-build-system)
    (arguments
     (list
      #:import-path "github.com/itchyny/gojq/cmd/gojq"
      #:unpack-path "github.com/itchyny/gojq"))
    (inputs
     (list go-github-com-google-go-cmp
           go-github-com-itchyny-timefmt-go
           go-github-com-mattn-go-isatty
           go-github-com-mattn-go-runewidth
           go-gopkg-in-yaml-v3))
    (home-page "https://github.com/itchyny/gojq")
    (synopsis "Pure Go implementation of jq")
    (description
     "@command{gojq} is an Go implementation and library of the jq JSON
processor.")
    (license license:expat)))

(define-public gojq
  (package
    (inherit go-github-com-itchyny-gojq)
    (name "gojq")
    (arguments
     (ensure-keyword-arguments
      (package-arguments go-github-com-itchyny-gojq)
      (list #:install-source? #f)))))

(define-public pup
  (let ((revision "1")
        (commit "681d7bb639334bf485476f5872c5bdab10931f9a"))
    (package
      (name "pup")
      (version (git-version "0.4.0" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/ericchiang/pup")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1hx1k0qlc1bq6gg5d4yprn4d7kvqzagg6mi5mvb39zdq6c4y17vr"))))
      (build-system go-build-system)
      (arguments
       `(#:import-path "github.com/ericchiang/pup"))
      (home-page "https://github.com/ericchiang/pup")
      (synopsis "Parse HTML at the command line")
      (description
       "@command{pup} is a command line tool for processing HTML.  It reads
from stdin, prints to stdout, and allows the user to filter parts of the page
using CSS selectors.  Inspired by @command{jq}, @command{pup} aims to be a
fast and flexible way of exploring HTML from the terminal.")
      (license license:expat))))

(define-public uhttpmock
  (package
    (name "uhttpmock")
    (version "0.5.3")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://tecnocode.co.uk/downloads/uhttpmock/"
                           "uhttpmock-" version ".tar.xz"))
       (sha256
        (base32 "0bqizz69hxk8rn4z57asz1d45vizl1rj6i5k3rzxn2x3qcik514h"))))
    (build-system glib-or-gtk-build-system)
    (native-inputs
     (list gobject-introspection
           ;; For check phase.
           glib-networking gsettings-desktop-schemas pkg-config))
    (inputs
     `(("libsoup" ,libsoup-minimal-2)))
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'check 'set-home-for-tests
           (lambda _
             (setenv "HOME" "/tmp"))))))
    (home-page "https://gitlab.com/groups/uhttpmock")
    (synopsis "Library for mocking web service APIs which use HTTP or HTTPS")
    (description
     "Uhttpmock is a project for mocking web service APIs which use HTTP or
HTTPS.  It provides a library, libuhttpmock, which implements recording and
playback of HTTP request/response traces.")
    (license license:lgpl2.1+)))

(define-public woof
  (package
    (name "woof")
    (version "20220202")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/simon-budig/woof")
                    (commit (string-append name "-" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0rm8xs5dhy42jhjpx30vwnvps2rnmrh8scfr89j6dnihc6mpjkmn"))))
    (build-system trivial-build-system)
    (arguments
     '(#:modules ((guix build utils))
       #:builder
       (begin
         (use-modules (guix build utils))
         (let* ((source (assoc-ref %build-inputs "source"))
                (out    (assoc-ref %outputs "out"))
                (bin    (string-append out "/bin"))
                (python (assoc-ref %build-inputs "python")))
           (mkdir-p bin)
           (with-directory-excursion bin
             (copy-file (in-vicinity source "woof") "woof")
             (patch-shebang "woof" (list (string-append python "/bin"))))
           #t))))
    (inputs (list python))
    (home-page "http://www.home.unix-ag.org/simon/woof.html")
    (synopsis "Single file web server")
    (description "Woof (Web Offer One File) is a small simple web server that
can easily be invoked on a single file.  Your partner can access the file with
tools they trust (e.g. wget).")
    (license license:gpl2+)))

(define netsurf-buildsystem
  (package
    (name "netsurf-buildsystem")
    (version "1.10")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://download.netsurf-browser.org/libs/releases/"
                           "buildsystem-" version ".tar.gz"))
       (sha256
        (base32
         "0yadmrpgvl9r08b56qiy5f77jracc7g9n4krn727fip4d7akjgix"))))
    (build-system gnu-build-system)
    (inputs `(("perl" ,perl)))
    (arguments
     '(#:make-flags (list (string-append "PREFIX=" %output))
       #:tests? #f                      ;no tests
       #:phases (modify-phases %standard-phases
                  (delete 'configure)
                  (delete 'build))))
    (home-page "https://www.netsurf-browser.org")
    (synopsis "Build system for the Netsurf project")
    (description
     "This package provides the shared build system for Netsurf project
libraries.")
    (license license:expat)))

(define netsurf-buildsystem-arguments
  `(#:make-flags `("COMPONENT_TYPE=lib-shared"
                   "CC=gcc" "BUILD_CC=gcc"
                   ,(string-append "PREFIX=" %output)
                   ,(string-append "NSSHARED="
                                   (assoc-ref %build-inputs
                                              "netsurf-buildsystem")
                                   "/share/netsurf-buildsystem"))
    #:test-target "test"
    #:phases (modify-phases %standard-phases
               (delete 'configure))))

(define-public libparserutils
  (package
    (name "libparserutils")
    (version "0.2.5")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://download.netsurf-browser.org/libs/releases/"
                           name "-" version "-src.tar.gz"))
       (sha256
        (base32
         "0ffi5q1jlcdl66nk3cax0mnzvhrjvvjvlx0rfasjfygi333xazii"))))
    (build-system gnu-build-system)
    (native-inputs
     (list netsurf-buildsystem pkg-config perl))                 ;for test harness
    (arguments netsurf-buildsystem-arguments)
    (home-page "https://www.netsurf-browser.org/projects/libparserutils/")
    (synopsis "Parser building library")
    (description
     "LibParserUtils is a library for building efficient parsers, written in
C.  It is developed as part of the NetSurf project.")
    (license license:expat)))

(define-public hubbub
  (package
    (name "hubbub")
    (version "0.3.8")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://download.netsurf-browser.org/libs/releases/"
                           "libhubbub-" version "-src.tar.gz"))
       (sha256
        (base32
         "19fm5h8arnsgxd4w5vr9s2fcb422acciffar3la0b36lygsydhca"))
       (patches (search-patches "hubbub-sort-entities.patch"))))
    (build-system gnu-build-system)
    (native-inputs
     (list netsurf-buildsystem
           pkg-config
           doxygen
           gperf
           json-c-0.12 ; check whether json-c-0.12 can be removed
           perl))
    (propagated-inputs
     (list libparserutils)) ;for libhubbub.pc
    (arguments netsurf-buildsystem-arguments)
    (home-page "https://www.netsurf-browser.org/projects/hubbub/")
    (synopsis "HTML5 compliant parsing library")
    (description
     "Hubbub is an HTML5 compliant parsing library, written in C, which can
parse both valid and invalid web content.  It is developed as part of the
NetSurf project.")
    (license license:expat)))

(define-public ikiwiki
  (package
    (name "ikiwiki")
    (version "3.20200202.4")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "git://git.ikiwiki.info/")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32
         "04ijislp7png18bg1carb71xk3sij9x5xpizfkxp6jbip6wdxsml"))
       (snippet
        '(begin
           ;; The POT file requires write permission during the build
           ;; phase.
           (chmod "po/ikiwiki.pot" #o644)
           #t))))
    (build-system perl-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'patch-source-shebangs 'patch-Makefiles
           (lambda _
             (substitute* "Makefile.PL"
                          (("SYSCONFDIR\\?=") "SYSCONFDIR?=$(PREFIX)"))
             (with-directory-excursion "po"
               (substitute* "Makefile"
                            (("PERL5LIB=") "PERL5LIB=${PERL5LIB}:")))
             #t))
         (add-before 'build 'set-modification-times
           ;; The wiki '--refresh' steps, which are executed during
           ;; the check phase, require recent timestamps on files in
           ;; the 'doc' and 'underlays' directories.
           (lambda _
             (invoke "find"  "doc" "underlays" "-type" "f" "-exec"
                     "touch" "{}" "+")
             #t))
         (add-before 'check 'pre-check
           (lambda* (#:key inputs #:allow-other-keys)
             ;; Six tests use IPC::Run.  For these tests the PERL5LIB
             ;; variable is needed in the runtime environment and also
             ;; in the search path list in the setup file.
             (substitute*
              '("t/aggregate-file.t" "t/git-cgi.t" "t/git-untrusted.t"
                "t/passwordauth.t" "t/relativity.t" "t/wrapper-environ.t")
              (("(.*)\"perl\"(.*)$" _ prefix suffix)
               (string-append prefix "qw(env), 'PERL5LIB='.$ENV{PERL5LIB}"
                              ", qw(perl)" suffix))
              (("(.*) PERL5LIB=(.*) perl(.*)$" _ prefix middle suffix)
               (string-append prefix "), 'PERL5LIB='.$ENV{PERL5LIB}.':"
                              middle "', qw(perl" suffix))
              (("(.*)setup(.* )getcwd(.*)$" _ prefix middle suffix)
               (string-append prefix "setup" middle
                              "$ENV{PERL5LIB}.':'.getcwd" suffix))
              (("^ENV(.*): '(.*)$" _ middle suffix)
               (string-append "ENV" middle
                              ": '$ENV{PERL5LIB}:" suffix)))
             ;; XDG_DATA_DIRS is needed by the podcast.t test.
             (setenv "XDG_DATA_DIRS"
                     (string-append (assoc-ref inputs "shared-mime-info")
                                    "/share"))
             ;; CC is needed by IkiWiki/Wrapper.pm.
             (setenv "CC" "gcc")
             #t))
         (add-after 'install 'wrap-programs
           (lambda* (#:key outputs #:allow-other-keys)
             (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))))))
    (native-inputs
     (list which
           gettext-minimal
           subversion
           git
           bazaar
           cvs
           mercurial))
    (inputs
     (list python-wrapper
           perl-authen-passphrase
           perl-cgi-simple
           perl-db-file
           perl-file-mimeinfo
           perl-html-tagset
           perl-image-magick
           perl-ipc-run
           perl-lwpx-paranoidagent
           perl-xml-feed
           perl-xml-sax
           perl-xml-twig
           perl-yaml-tiny

           ;; Ikiwiki loads po4a as a library, and thus needs the po4a dependencies
           ;; available.  Duplicate them here.
           ;; XXX: It would be ideal to hard code these in po4a somehow.
           perl-syntax-keyword-try
           perl-xs-parse-keyword
           po4a))
    (propagated-inputs
     (list perl-cgi-formbuilder
           perl-cgi-session
           perl-html-parser
           perl-html-scrubber
           perl-html-template
           perl-json
           perl-mail-sendmail
           perl-text-markdown-discount
           perl-timedate
           perl-uri
           perl-xml-simple
           perl-yaml-libyaml))
    (home-page "https://ikiwiki.info/")
    (synopsis "Wiki compiler, capable of generating HTML")
    (description
     "Ikiwiki is a wiki compiler, capable of generating a static set of web
pages, but also incorporating dynamic features like a web based editor and
commenting.")
    (license license:gpl2+)))

(define-public libwapcaplet
  (package
    (name "libwapcaplet")
    (version "0.4.3")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://download.netsurf-browser.org/libs/releases/"
                           "libwapcaplet-" version "-src.tar.gz"))
       (sha256
        (base32
         "0p0c2q9lsj4vs97aa7vjllfhw33zv3dpysdkjblzhib6dpfs2alv"))))
    (build-system gnu-build-system)
    (native-inputs
     (list netsurf-buildsystem pkg-config check-0.14))          ;for tests
    (arguments netsurf-buildsystem-arguments)
    (home-page "https://www.netsurf-browser.org/projects/libwapcaplet/")
    (synopsis "String internment library")
    (description
     "LibWapcaplet provides a reference counted string internment system
designed to store small strings and allow rapid comparison of them.  It is
developed as part of the Netsurf project.")
    (license license:expat)))

(define-public libcss
  (package
    (name "libcss")
    (version "0.9.2")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://download.netsurf-browser.org/libs/releases/"
                           "libcss-" version "-src.tar.gz"))
       (sha256
        (base32
         "0khmf5bdpkc09fpsgwzi23sihpadvyr02jx0q5h1vm9lxjxibwid"))
       (patches (search-patches "libcss-check-format.patch"))))
    (build-system gnu-build-system)
    (native-inputs
     (list netsurf-buildsystem pkg-config perl))
    (propagated-inputs                  ;needed for libcss.pc
     (list libparserutils libwapcaplet))
    (arguments netsurf-buildsystem-arguments)
    (home-page "https://www.netsurf-browser.org/projects/libcss/")
    (synopsis "CSS parser and selection library")
    (description
     "LibCSS is a CSS (Cascading Style Sheet) parser and selection engine,
written in C.  It is developed as part of the NetSurf project.")
    (license license:expat)))

(define-public libdom
  (package
    (name "libdom")
    (version "0.4.2")                 ;TODO include patch for additional tags?
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://download.netsurf-browser.org/libs/releases/"
                           "libdom-" version "-src.tar.gz"))
       (sha256
        (base32
         "0g0gqcglk8f8gbygbcq5ylcx84zsf0vczbm3n3118w2l2splapnh"))))
    (build-system gnu-build-system)
    (native-inputs
     (list netsurf-buildsystem
           pkg-config
           perl ;for test harness
           perl-libxml
           perl-switch
           perl-xml-xpath))
    (inputs
     (list libparserutils libwapcaplet))
    (propagated-inputs
     (list expat ;needed for headers and linking
           hubbub))             ;for libdom.pc
    (arguments
     `(#:tests? #f                 ;TODO: re-enable. tests take a looong time.
       ,@netsurf-buildsystem-arguments))
    (home-page "https://www.netsurf-browser.org/projects/libdom/")
    (synopsis "Implementation of the W3C DOM")
    (description
     "LibDOM is an implementation of the W3C DOM, written in C.  It is
developed as part of the NetSurf project.")
    (license license:expat)))

(define-public libsvgtiny
  (package
    (name "libsvgtiny")
    (version "0.1.8")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://download.netsurf-browser.org/libs/releases/"
                           name "-" version "-src.tar.gz"))
       (sha256
        (base32
         "0750q884ax8wygl64wq03zdjj8h838ch3f8jdfkv4gz809zj4my3"))))
    (build-system gnu-build-system)
    (native-inputs
     (list netsurf-buildsystem pkg-config gperf-3.0))
    (inputs
     (list libwapcaplet))
    (propagated-inputs
     (list libdom))             ;for libsvgtiny.pc
    (arguments netsurf-buildsystem-arguments)
    (home-page "https://www.netsurf-browser.org/projects/libsvgtiny/")
    (synopsis "Library for parsing SVG files")
    (description
     "Libsvgtiny takes some SVG as input and returns a list of paths and texts
which can be rendered easily, as defined in
@url{http://www.w3.org/TR/SVGMobile/}.  It is developed as part of the NetSurf
project.")
    (license license:expat)))

(define-public libnsbmp
  (package
    (name "libnsbmp")
    (version "0.1.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://download.netsurf-browser.org/libs/releases/"
                           name "-" version "-src.tar.gz"))
       (sha256
        (base32
         "14r2v1ich4lxn3sdwpiwq5adydrd1qlhbd8mbamalaqj59laf1sl"))))
    (build-system gnu-build-system)
    (native-inputs
     (list netsurf-buildsystem))
    (arguments netsurf-buildsystem-arguments)
    (home-page "https://www.netsurf-browser.org/projects/libnsbmp/")
    (synopsis "Decoding library for BMP and ICO files")
    (description
     "Libnsbmp is a decoding library for BMP and ICO image file formats,
written in C.  It is developed as part of the NetSurf project.")
    (license license:expat)))

(define-public libnsfb
  (package
    (name "libnsfb")
    (version "0.2.2")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://download.netsurf-browser.org/libs/releases/"
                           name "-" version "-src.tar.gz"))
       (sha256
        (base32 "16m3kv8x8mlic4z73h2s3z8lqmyp0z8i30x95lzr1pslxfinqi5y"))))
    (build-system gnu-build-system)
    (native-inputs
     (list netsurf-buildsystem pkg-config))
    (inputs
     ;; SDL is needed to accept any (keyboard, mouse) input.  Don't propagate it
     ;; to satisfy libnsfb.pc: netsurf is the only user and not worth the pain.
     (list sdl))
    (arguments netsurf-buildsystem-arguments)
    (home-page "https://www.netsurf-browser.org/projects/libnsfb/")
    (synopsis "Framebuffer display abstraction library")
    (description
     "LibNSFB is a framebuffer abstraction library, written in C.  It is
developed as part of the NetSurf project and is intended to be suitable for use
in other projects too.

The overall idea of the library is to provide a generic abstraction to a linear
section of memory which corresponds to a visible array of pixel elements on a
display device.  Different colour depths are supported and the library provides
routines for tasks such as drawing onto the framebuffer and rectangle copy
operations.")
    (license license:expat)))

(define-public libnsgif
  (package
    (name "libnsgif")
    (version "1.0.0")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://download.netsurf-browser.org/libs/releases/"
                           name "-" version "-src.tar.gz"))
       (sha256
        (base32
         "06q69hn0nz3c6hnwmzfcldyrppkvimx3s97ql3sx4m0lyr1ch530"))))
    (build-system gnu-build-system)
    (native-inputs
     (list netsurf-buildsystem))
    (arguments netsurf-buildsystem-arguments)
    (home-page "https://www.netsurf-browser.org/projects/libnsgif/")
    (synopsis "Decoding library for GIF files")
    (description
     "Libnsgif is a decoding library for the GIF image file format, written in
C.  It is developed as part of the NetSurf project.")
    (license license:expat)))

(define-public libnslog
  (package
    (name "libnslog")
    (version "0.1.3")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://download.netsurf-browser.org/libs/releases/"
                           "libnslog-" version "-src.tar.gz"))
       (sha256
        (base32
         "1l2k0kdv9iv18svhv360vszjavhl4g09cp8a8yb719pgsylxr67w"))))
    (build-system gnu-build-system)
    (native-inputs
     (list netsurf-buildsystem
           pkg-config
           check ; For tests
           bison
           flex))
    (arguments netsurf-buildsystem-arguments)
    (home-page "https://www.netsurf-browser.org/")
    (synopsis "Logging library")
    (description
     "Libnslog provides a category-based logging library which supports
complex logging filters, multiple log levels, and provides context through to
client applications.  It is developed as part of the NetSurf project.")
    (license license:expat)))

(define-public libnsutils
  (package
    (name "libnsutils")
    (version "0.1.1")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://download.netsurf-browser.org/libs/releases/"
                           name "-" version "-src.tar.gz"))
       (sha256
        (base32
         "14pakllwf7a205d0dkvyg8jhmqfbi5sh5riw840d13j5dr9b952n"))))
    (build-system gnu-build-system)
    (native-inputs
     (list netsurf-buildsystem))
    (arguments netsurf-buildsystem-arguments)
    (home-page "https://www.netsurf-browser.org/")
    (synopsis "Utility library for NetSurf")
    (description
     "Libnsutils provides a small number of useful utility routines.  It is
developed as part of the NetSurf project.")
    (license license:expat)))

(define-public libnspsl
  (package
    (name "libnspsl")
    (version "0.1.7")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://download.netsurf-browser.org/libs/releases/"
                           "libnspsl-" version "-src.tar.gz"))
       (sha256
        (base32
         "105cjkb622wz11z26il4j1n4ydyrrgv0nglr67aawpam5z1wx11n"))))
    (build-system gnu-build-system)
    (native-inputs
     (list netsurf-buildsystem))
    (arguments netsurf-buildsystem-arguments)
    (home-page "https://www.netsurf-browser.org/")
    (synopsis "Library to generate a static Public Suffix List")
    (description
     "Libnspsl is a library to generate a static code representation of the
Public Suffix List.  It is developed as part of the NetSurf project.")
    (license license:expat)))

(define-public nsgenbind
  (package
    (name "nsgenbind")
    (version "0.9")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://download.netsurf-browser.org/libs/releases/"
                           "nsgenbind-" version "-src.tar.gz"))
       (sha256
        (base32
         "0p9q9ffn9hf1qrphz2qxq2xvyysn5kg2dbl8cbnkwb5wdkvf0b13"))))
    (build-system gnu-build-system)
    (native-inputs
     (list netsurf-buildsystem bison flex))
    (arguments
     (substitute-keyword-arguments netsurf-buildsystem-arguments
       ((#:make-flags flags)
        `(delete "COMPONENT_TYPE=lib-shared" ,flags))))
    (home-page "https://www.netsurf-browser.org/")
    (synopsis "Generate JavaScript to DOM bindings")
    (description
     "@code{nsgenbind} is a tool to generate JavaScript to DOM bindings from
w3c webidl files and a binding configuration file.")
    (license license:expat)))

(define-public netsurf
  (package
    (name "netsurf")
    (version "3.11")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://download.netsurf-browser.org/netsurf/"
                           "releases/source/netsurf-" version "-src.tar.gz"))
       (sha256
        (base32
         "1chw40nx7krpy7m14bajfrcj88h98if8py0k7c2qshpfxxm652n2"))
       (patches (search-patches "netsurf-system-utf8proc.patch"
                                "netsurf-y2038-tests.patch"
                                "netsurf-longer-test-timeout.patch"
                                "netsurf-message-timestamp.patch"))))
    (build-system glib-or-gtk-build-system)
    (native-inputs
     (list netsurf-buildsystem
           nsgenbind
           libidn ;only for tests
           check
           perl
           perl-html-parser
           pkg-config
           xxd))
    (inputs
     `(("curl" ,curl)
       ("gtk+" ,gtk+)
       ("openssl" ,openssl)
       ("utf8proc" ,utf8proc)
       ("libpng" ,libpng)
       ("libjpeg" ,libjpeg-turbo)
       ("libcss" ,libcss)
       ("libdom" ,libdom)
       ("libnsbmp" ,libnsbmp)
       ("libnsgif" ,libnsgif)
       ("libnslog" ,libnslog)
       ("libnspsl" ,libnspsl)
       ("libnsutils" ,libnsutils)
       ("libsvgtiny" ,libsvgtiny)
       ("miscfiles" ,miscfiles)))
    (arguments
     `(#:make-flags `("CC=gcc" "BUILD_CC=gcc"
                      "TARGET=gtk3"
                      ,(string-append "PREFIX=" %output)
                      ,(string-append "NSSHARED="
                                      (assoc-ref %build-inputs
                                                 "netsurf-buildsystem")
                                      "/share/netsurf-buildsystem"))
       #:test-target "test"
       #:modules ((ice-9 rdelim)
                  (ice-9 match)
                  (srfi srfi-1)
                  (sxml simple)
                  ,@%glib-or-gtk-build-system-modules)
       #:phases
       (modify-phases %standard-phases
         (delete 'configure)
         (add-after 'unpack 'remove-timestamps
           ;; Avoid embedding timestamp for reproducible builds
           (lambda _
             (substitute* "tools/git-testament.pl"
               (("WT_COMPILEDATE ..$compiledate")
                "WT_COMPILEDATE \\\""))))
         (add-after 'build 'adjust-welcome
           (lambda _
             (substitute* "frontends/gtk/res/welcome.html"
               ;; Close some XHTML tags.
               (("<(img|input)([^>]*)>" _ tag contents)
                (string-append "<" tag contents " />"))
               ;; Increase freedom.
               ((" open source") ", free software"))
             (with-atomic-file-replacement "frontends/gtk/res/welcome.html"
               (lambda (in out)
                 ;; Leave the DOCTYPE header as is.
                 (display (read-line in 'concat) out)
                 (sxml->xml
                  (let rec ((sxml (xml->sxml in
                                             #:default-entity-handler
                                             (lambda (port name)
                                               (string-append "<ENTITY>"
                                                              (symbol->string name)
                                                              "</ENTITY>")))))
                    ;; We'd like to use sxml-match here, but it can't
                    ;; match against generic tag symbols...
                    (match sxml
                      ;; Remove default links so it doesn't seem we're
                      ;; endorsing them.
                      (`(div (@ (class "links")) . ,rest)
                       '())
                      ;; Prefer a more privacy-respecting default search
                      ;; engine.
                      (`(form . ,rest)
                       `(form (@ (action "https://lite.duckduckgo.com/lite/")
                                 (method "post"))
                              (div (@ (class "websearch"))
                                   (input (@ (type "text")
                                             (size "42")
                                             (name "q")
                                             (autocomplete "off")
                                             (value "")))
                                   (input (@ (type "submit")
                                             (value "DuckDuckGo Search"))))))
                      (`(ENTITY ,ent)
                       `(*ENTITY* ,ent))
                      ((x ...)
                       (map rec x))
                      (x x)))
                  out)))
             #t))
         (add-before 'check 'patch-check
           (lambda* (#:key inputs #:allow-other-keys)
             (substitute* '("test/bloom.c" "test/hashtable.c")
               (("/usr/share/dict/words")
                (search-input-file inputs "/share/web2")))
             #t))
         (add-after 'install 'install-more
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (desktop (string-append out "/share/applications/"
                                            "netsurf.desktop")))
               (mkdir-p (dirname desktop))
               (copy-file "frontends/gtk/res/netsurf-gtk.desktop"
                          desktop)
               (substitute* desktop
                 (("netsurf-gtk") (string-append out "/bin/netsurf-gtk3"))
                 (("netsurf.png") (string-append out "/share/netsurf/"
                                                 "netsurf.xpm")))
               (install-file "docs/netsurf-gtk.1"
                             (string-append out "/share/man/man1/"))
               #t))))))
    (home-page "https://www.netsurf-browser.org")
    (synopsis "Web browser")
    (description
     "NetSurf is a lightweight web browser that has its own layout and
rendering engine entirely written from scratch.  It is small and capable of
handling many of the web standards in use today.")
    (license license:gpl2+)))

(define-public surfraw
  (package
    (name "surfraw")
    (version "2.3.0")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://gitlab.com/surfraw/Surfraw/uploads/"
                           "2de827b2786ef2fe43b6f07913ca7b7f/"
                           "surfraw-" version ".tar.gz"))
       (sha256
        (base32 "099nbif0x5cbcf18snc58nx1a3q7z0v9br9p2jiq9pcc7ic2015d"))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'configure 'patch-perl
           (lambda* (#:key inputs #:allow-other-keys)
             (let ((perl (assoc-ref inputs "perl")))
               (substitute* "surfraw.IN"
                 (("perl -e")
                  (string-append perl "/bin/perl -e")))
               #t)))
         (add-after 'install 'compress-elvi.1sr
           (lambda* (#:key outputs #:allow-other-keys)
             ;; The manpages of the elvis are symlinks to elvi.1sr.gz
             ;; but elvi.1sr does not get compressed by our manpage phase.
             (let* ((out (assoc-ref %outputs "out"))
                    (man (string-append out "/share/man/man1")))
               (with-directory-excursion man
                 (invoke "gzip" "elvi.1sr"))))))))
    (inputs
     (list perl perl-www-opensearch perl-html-parser perl-libwww))
    (synopsis "Unix command line interface to the www")
    (description "Surfraw (Shell Users' Revolutionary Front Rage Against the Web)
provides a unix command line interface to a variety of popular www search engines
and similar services.")
    (home-page "https://surfraw.alioth.debian.org/")
    (license license:public-domain)))

(define-public darkhttpd
  (package
    (name "darkhttpd")
    (version "1.13")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/emikulic/darkhttpd")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0w11xq160q9yyffv4mw9ncp1n0dl50d9plmwxb0yijaaxls9i4sk"))))
    (build-system gnu-build-system)
    (arguments
     `(#:make-flags
       (list (string-append "CC=" ,(cc-for-target)))
       #:tests? #f ; No test suite
       #:phases
       (modify-phases %standard-phases
         (delete 'configure)            ; no configure script
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (install-file "darkhttpd"
                           (string-append (assoc-ref outputs "out")
                                          "/bin")))))))
    (synopsis "Simple static web server")
    (description "darkhttpd is a simple static web server.  It is
standalone and does not need inetd or ucspi-tcp.  It does not need any
config files---you only have to specify the www root.")
    (home-page "https://unix4lyfe.org/darkhttpd/")
    (license license:isc)))

(define-public goaccess
  (package
    (name "goaccess")
    (version "1.7.2")
    (source (origin
              (method url-fetch)
              (uri (string-append "http://tar.goaccess.io/goaccess-"
                                  version ".tar.gz"))
              (sha256
               (base32
                "0sqjkla4fjw5h49x675qibp860bk0haajc3i31m1q782kjiap6hf"))
              (modules '((guix build utils)))
              (snippet '(substitute* '("src/error.h"
                                       "src/parser.c")
                          (("__DATE__") "\"1970-01-01\"")
                          (("__TIME__") "\"00:00:00\"")))))
    (build-system gnu-build-system)
    (arguments
     (list
      #:configure-flags
      '(list "--enable-geoip=mmdb"
             "--enable-utf8")))
    (inputs
     (list glib ncurses libmaxminddb openssl))
    (native-inputs
     (list pkg-config))
    (home-page "https://goaccess.io")
    (synopsis "Analyze Web server logs in real time")
    (description
     "GoAccess is a real-time web log analyzer and interactive viewer that
runs in a terminal or through your browser.  It provides fast and valuable
HTTP statistics for system administrators that require a visual server report
on the fly.")
    (license license:x11)))

(define-public hitch
  (package
    (name "hitch")
    (version "1.7.3")
    (home-page "https://hitch-tls.org/")
    (source (origin
              (method url-fetch)
              (uri (string-append home-page "source/hitch-" version ".tar.gz"))
              (sha256
               (base32
                "11wp50zs5irb5bj5xyanm060nlvna6ha328wqf6p2nvpbnaz86qs"))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases (modify-phases %standard-phases
                  (add-before 'check 'pre-check
                    (lambda _
                      ;; Our grep is compiled without perl regexp support. So,
                      ;; rewrite the grep command to not use it. \t tab
                      ;; characters are supported only in perl regexps. So,
                      ;; put in literal tabs using printf instead.
                      (substitute* "src/tests/test32-proxy-authority.sh"
                        (("grep -Pq") "grep -q")
                        (("extension:\\\\tdefault")
                         "extension:$(printf '\\011')default"))
                      ;; Most tests attempts to access hitch-tls.org which is
                      ;; unavailable in the build container.  Run them against
                      ;; a dummy local web server instead.
                      (for-each (lambda (test)
                                  (substitute* test
                                    (("\\[hitch-tls\\.org\\]:80")
                                     "[localhost]:8000")))
                                (find-files "src/tests" "\\.sh$"))
                      (system "python3 -m http.server &")

                      ;; The build container does not reap zombie processes,
                      ;; causing stop_hitch to hang indefinitely while waiting
                      ;; for the process to terminate because 'kill -0' never
                      ;; succeeds.  Use a different test to see whether the
                      ;; process has shut down.
                      (substitute* "src/tests/hitch_test.sh"
                        (("kill -0 \"\\$HITCH_PID\"")
                         "$(ps -p $HITCH_PID -o state= | grep -qv '^Z$')")))))))
    (native-inputs
     (list pkg-config

           ;; For tests.
           curl
           grep
           lsof
           procps
           python))
    (inputs
     (list libev openssl))
    (synopsis "Scalable TLS proxy")
    (description
     "Hitch is a performant TLS proxy based on @code{libev}.  It terminates
SSL/TLS connections and forwards the unencrypted traffic to a backend such
as a web server.  It is designed to handle many thousand connections on
multicore machines.")
    (license license:bsd-2)))

(define-public httptunnel
  (package
    (name "httptunnel")
    (version "3.3")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "http://www.nocrew.org/software/httptunnel/"
                           name "-" version ".tar.gz"))
       (sha256
        (base32
         "0mn5s6p68n32xzadz6ds5i6bp44dyxzkq68r1yljlv470jr84bql"))
       (modules '((guix build utils)))
       (snippet '(begin
                   ;; Remove non-free IETF RFC documentation.
                   (delete-file-recursively "doc")
                   #t))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         ;; The default configure phase tries to pass environment variables as
         ;; command-line arguments, which confuses the ./configure script.
         (replace 'configure
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out")))
               (setenv "CONFIG_SHELL" (which "bash"))
               (invoke "./configure"
                       (string-append "--prefix=" out))))))))
    (home-page "http://www.nocrew.org/software/httptunnel.html")
    (synopsis "Tunnel data connections through HTTP requests")
    (description "httptunnel creates a bidirectional virtual data connection
tunnelled through HTTP (HyperText Transfer Protocol) requests.  This can be
useful for users behind restrictive firewalls.  As long as Web traffic is
allowed, even through a HTTP-only proxy, httptunnel can be combined with other
tools like SSH (Secure Shell) to reach the outside world.")
    (license license:gpl2+)))

(define-public stunnel
  (package
  (name "stunnel")
  (version "5.66")
  (source
    (origin
      (method url-fetch)
      (uri (string-append "https://www.stunnel.org/downloads/stunnel-"
                          version ".tar.gz"))
      (sha256
       (base32 "172pkzp8qilj0gd92bhdi96739gjpgbcav5c7a4gd98s9mq7i0am"))))
  (build-system gnu-build-system)
  (arguments
   (list #:configure-flags
         #~(list (string-append "--with-ssl="
                                #$(this-package-input "openssl")))
         #:phases
         #~(modify-phases %standard-phases
             (add-after 'unpack 'patch-output-directories
               (lambda _
                 ;; Some (not all) Makefiles have a hard-coded incorrect docdir.
                 (substitute* (list "Makefile.in"
                                    "doc/Makefile.in"
                                    "tools/Makefile.in")
                   (("/doc/stunnel")
                    (string-append "/doc/" #$name "-" #$version)))))
             (add-after 'install 'prune-documentation
               (lambda _
                 (let* ((doc (string-append #$output "/share/doc/"
                                            #$name "-" #$version)))
                   (for-each delete-file (find-files doc "^INSTALL"))))))))
  (native-inputs
   ;; For tests.
   (list iproute
         netcat
         procps
         python))
  (inputs (list openssl))
  (home-page "https://www.stunnel.org")
  (synopsis "TLS proxy for clients or servers")
  (description "Stunnel is a proxy designed to add TLS encryption
functionality to existing clients and servers without any changes in the
programs' code.  Its architecture is optimized for security, portability, and
scalability (including load-balancing), making it suitable for large
deployments.")
  (license license:gpl2+)))

(define-public varnish
  (package
    (name "varnish")
    (home-page "https://varnish-cache.org/")
    (version "7.3.0")
    (source (origin
              (method url-fetch)
              (uri (string-append home-page "_downloads/varnish-" version ".tgz"))
              (sha256
               (base32
                "1rsay4vrg0dvf8d7bpj8dvaax4v949p6x1l6qd3hdabhq87bpnz2"))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
                               (string-append "CC=" ,(cc-for-target))
                               ;; Use absolute path of GCC so it's found at runtime.
                               (string-append "PTHREAD_CC="
                                              (search-input-file %build-inputs
                                                                 "/bin/gcc"))
                               "--localstatedir=/var")
       ,@(if (target-x86-32?)
             '(#:make-flags
               (list "CFLAGS+=-fexcess-precision=standard"))
             '())
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'use-absolute-file-names
           (lambda* (#:key native-inputs inputs #:allow-other-keys)
             (let* ((inpts (or native-inputs inputs))
                    (sh (search-input-file inpts "/bin/sh"))
                    (rm (search-input-file inpts "/bin/rm")))
               (substitute* '("bin/varnishtest/vtc_varnish.c"
                              "bin/varnishtest/vtc_process.c"
                              "bin/varnishtest/vtc_haproxy.c"
                              "bin/varnishtest/tests/u00014.vtc"
                              "bin/varnishd/mgt/mgt_vcc.c")
                 (("/bin/sh") sh))
               (substitute* "bin/varnishd/mgt/mgt_shmem.c"
                 (("rm -rf") (string-append rm " -rf")))
               (substitute* "bin/varnishtest/vtc_main.c"
                 (("/bin/rm") rm)))))
         (add-before 'install 'patch-Makefile
           (lambda _
             (substitute* "Makefile"
               ;; Do not create /var/varnish during install.
               (("^install-data-am: install-data-local") "install-data-am: "))))
         (add-after 'install 'wrap-varnishd
           ;; Varnish uses GCC to compile VCL, so wrap it with required GCC
           ;; environment variables to avoid propagating them to profiles.
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (varnishd (string-append out "/sbin/varnishd"))
                    (PATH (string-append (assoc-ref inputs "binutils") "/bin"))
                    (LIBRARY_PATH (string-append (assoc-ref inputs "libc") "/lib")))
               (wrap-program varnishd
                 ;; Add binutils to PATH so gcc finds the 'as' executable.
                 `("PATH" ":" prefix (,PATH))
                 ;; Make sure 'crti.o' et.al is found.
                 `("LIBRARY_PATH" ":" prefix (,LIBRARY_PATH)))))))))
    (native-inputs
     (list pkg-config python-sphinx python-docutils))
    (inputs
     (list bash-minimal
           coreutils
           jemalloc
           ncurses
           pcre2
           python
           readline))
    (synopsis "Web application accelerator")
    (description
     "Varnish is a high-performance HTTP accelerator.  It acts as a caching
reverse proxy and load balancer.  You install it in front of any server that
speaks HTTP and configure it to cache the contents through an extensive
configuration language.")
    (properties
     '((release-monitoring-url . "https://varnish-cache.org/releases/index.html")))
    (license (list license:bsd-2           ;main distribution
                   license:zlib            ;lib/libvgz/*
                   license:public-domain   ;bin/varnishncsa/as64.c, include/miniobj.h
                   license:bsd-3))))       ;include/vqueue.h, lib/libvarnishcompat/daemon.c

(define-public varnish-modules
  (package
    (name "varnish-modules")
    (home-page "https://github.com/varnish/varnish-modules")
    (version "0.22.0")
    (source (origin
              (method git-fetch)
              (uri (git-reference (url home-page) (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1dxnla1k6kra0nkvm20iszgmq0czr5bgx002qlljwf9fl25vm1ks"))))
    (build-system gnu-build-system)
    (native-inputs
     (list pkg-config
           ;; For bootstrapping.
           autoconf
           automake
           libtool
           ;; For generating manuals.
           python-docutils))
    (inputs
     (list python varnish))
    (synopsis "Collection of Varnish modules")
    (description
     "This package provides a collection of modules (@dfn{vmods}) for the Varnish
cache server, extending the @acronym{VCL, Varnish Configuration Language} with
additional capabilities.")
    (license license:bsd-2)))

(define-public xinetd
  (package
    (name "xinetd")
    ;; This is the maintenance fork currently used by openSUSE and Debian.
    (version "2.3.15.4")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/openSUSE/xinetd")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0lrp3lcj6azhjplwxws2rx40bkyp6i6bp7n77ndcisb7ninad30q"))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags '("--with-loadavg")
       #:tests? #f))                    ; no tests
    (native-inputs
     (list autoconf automake libtool pkg-config))
    (home-page "https://github.com/openSUSE/xinetd")
    (synopsis "Internet services daemon")
    (description "@code{xinetd}, a more secure replacement for @code{inetd},
listens for incoming requests over a network and launches the appropriate
service for that request.  Requests are made using port numbers as identifiers
and xinetd usually launches another daemon to handle the request.  It can be
used to start services with both privileged and non-privileged port numbers.")
    (license (license:fsf-free "file://COPYRIGHT"))))

(define-public tidy-html
  (package
    (name "tidy-html")
    (version "5.8.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
              (url "https://github.com/htacg/tidy-html5")
              (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32
         "1vd50q6xqxvidaclinsm89p6r0494wj72j1gpk32vkkhhx15cddz"))))
    (build-system cmake-build-system)
    (outputs '("out"
               "static"))               ; 1.3MiB of .a files
    (arguments
     `(#:tests? #f                      ; no tests available
       #:build-type "Release"
       #:phases
       (modify-phases %standard-phases
         (add-after 'install 'move-static-libraries
           (lambda* (#:key outputs #:allow-other-keys)
             ;; Move static libraries to the "static" output.
             (let* ((out    (assoc-ref outputs "out"))
                    (lib    (string-append out "/lib"))
                    (static (assoc-ref outputs "static"))
                    (slib   (string-append static "/lib")))
               (mkdir-p slib)
               (for-each (lambda (file)
                           (install-file file slib)
                           (delete-file file))
                         (find-files lib "\\.a$"))
               #t))))))
    (native-inputs
     (list libxslt))
    (home-page "https://www.html-tidy.org/")
    (synopsis "HTML Tidy with HTML5 support")
    (description
     "Tidy is a console application which corrects and cleans up
HTML and XML documents by fixing markup errors and upgrading
legacy code to modern standards.

Tidy also provides @code{libtidy}, a C static and dynamic library that
developers can integrate into their applications to make use of the
functions of Tidy.")
    (license license:bsd-3)))

(define-public tidy
  (deprecated-package "tidy" tidy-html))

(define-public hiawatha
  (package
    (name "hiawatha")
    (version "10.11")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://www.hiawatha-webserver.org/files/"
                           "hiawatha-" version ".tar.gz"))
       (modules '((guix build utils)))
       (snippet '(begin
                   ;; We use packaged libraries, so delete the bundled copies.
                   (for-each delete-file-recursively
                             (list "extra/nghttp2.tgz" "mbedtls"))
                   #t))
       (sha256
        (base32 "09wpgilbv13zal71v9lbsqr8c3fignygadykpd1p1pb8blb5vn3r"))))
    (build-system cmake-build-system)
    (arguments
     `(#:tests? #f                      ; no tests included
       #:configure-flags (list (string-append "-DUSE_SYSTEM_MBEDTLS=on")
                               (string-append "-DENABLE_HTTP2=on")
                               (string-append "-DUSE_SYSTEM_NGHTTP2=on")
                               (string-append "-DENABLE_TOMAHAWK=on")
                               (string-append "-DLOG_DIR=/var/log/hiawatha")
                               (string-append "-DPID_DIR=/run")
                               (string-append "-DWEBROOT_DIR="
                                              (assoc-ref %outputs "out")
                                              "/share/hiawatha/html")
                               (string-append "-DWORK_DIR=/var/lib/hiawatha"))
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'install-no-empty-directories
           (lambda _
             (substitute* "CMakeLists.txt"
               (("install\\(DIRECTORY DESTINATION" match)
                (string-append "#" match)))
             #t))
         (add-after 'install 'wrap
           (lambda* (#:key inputs outputs #:allow-other-keys)
             ;; Make sure 'hiawatha' finds 'mbedtls'.
             (let* ((out (assoc-ref outputs "out"))
                    (sbin (string-append out "/sbin"))
                    (mbed (assoc-ref inputs "mbedtls")))
               (wrap-program (string-append sbin "/hiawatha")
                 `("PATH" ":" prefix (,mbed)))))))))
    (inputs
     ;; TODO: package "hiawatha-monitor", an optional dependency of "hiawatha".
     (list libxslt libxml2 mbedtls-for-hiawatha
           `(,nghttp2 "lib") zlib))
    (home-page "https://www.hiawatha-webserver.org")
    (synopsis "Webserver with focus on security")
    (description
     "Hiawatha has been written with security in mind.
Features include the ability to stop SQL injections, XSS and CSRF attacks and
exploit attempts.")
    (license license:gpl2)))

(define-public python-httpbin
  (package
    (name "python-httpbin")
    (version "0.5.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "httpbin" version))
       (sha256
        (base32
         "1dc92lnk846hpilslrqnr63x55cxll4qx88gif8fm521gv9cbyvr"))))
    (build-system python-build-system)
    (propagated-inputs
     (list python-decorator python-flask python-itsdangerous
           python-markupsafe python-six))
    (home-page "https://github.com/Runscope/httpbin")
    (synopsis "HTTP request and response service")
    (description "Testing an HTTP Library can become difficult sometimes.
@code{RequestBin} is fantastic for testing POST requests, but doesn't let you control the
response.  This exists to cover all kinds of HTTP scenarios.  All endpoint responses are
JSON-encoded.")
    (license license:isc)))

(define-public python-pytest-httpbin
  (package
    (name "python-pytest-httpbin")
    (version "0.2.3")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pytest-httpbin" version))
       (sha256
        (base32
         "1y0v2v7xpzpyd4djwp7ad8ifnlxp8r1y6dfbxg5ckzvllkgridn5"))))
    (build-system python-build-system)
    (propagated-inputs
     (list python-six python-httpbin python-pytest))
    (home-page
     "https://github.com/kevin1024/pytest-httpbin")
    (synopsis
     "Test your HTTP library against a local copy of httpbin")
    (description
     "@code{Pytest-httpbin} creates a @code{pytest} fixture that is dependency-injected
into your tests.  It automatically starts up a HTTP server in a separate thread running
@code{httpbin} and provides your test with the URL in the fixture.")
    (license license:expat)))

(define-public http-parser
  (let ((commit "ec8b5ee63f0e51191ea43bb0c6eac7bfbff3141d")
        (revision "1"))
    (package
      (name "http-parser")
      (version (git-version "2.9.4" revision commit))
      (home-page "https://github.com/nodejs/http-parser")
      (source
       (origin
         (method git-fetch)
         (uri (git-reference (url home-page)
                             (commit commit)))
         (sha256
          (base32 "0f297hrbx0kvy3qwgm9rhmbnjww6iljlcz9grsc9d4km1qj1071i"))
         (file-name (git-file-name name version))
         (patches
          (append
           (search-patches "http-parser-CVE-2020-8287.patch")
           (list
            (origin
              ;; Treat an empty port (e.g. `http://hostname:/`) when parsing
              ;; URLs as if no port were specified.  This patch is applied
              ;; to Fedora's http-parser and to libgit2's bundled version.
              (method url-fetch)
              (uri (string-append
                    "https://src.fedoraproject.org/rpms/http-parser/raw/"
                    "e89b4c4e2874c19079a5a1a2d2ccc61b551aa289/"
                    "f/0001-url-treat-empty-port-as-default.patch"))
              (sha256
               (base32
                "0pbxf2nq9pcn299k2b2ls8ldghaqln9glnp79gi57mamx4iy0f6g"))))))
         (modules '((guix build utils)))
         (snippet
          '(begin
             ;; This assertion fails when building for i686-linux.
             (substitute* "test.c"
               (("assert\\(sizeof\\(http_parser\\) == 32\\);")
                "assert(1);"))
             #t))))
      (build-system gnu-build-system)
      (arguments
       `(#:test-target "test"
         #:make-flags
         (list (string-append "PREFIX="
                              (assoc-ref %outputs "out"))
               "library"
               ,@(if (%current-target-system)
                     '()
                     '("CC=gcc")))
         #:phases
         (modify-phases %standard-phases
           ,@(if (%current-target-system)
                 '((replace 'configure
                     (lambda* (#:key target #:allow-other-keys)
                       (substitute* (find-files "." "Makefile")
                         (("CC\\?=.*$")
                          (string-append "CC=" target "-gcc\n"))
                         (("AR\\?=.*$")
                          (string-append "AR=" target "-ar\n")))
                       #t)))
                 '((delete 'configure))))))
      (synopsis "HTTP request/response parser for C")
      (description "This is a parser for HTTP messages written in C.  It
parses both requests and responses.  The parser is designed to be used in
high-performance HTTP applications.  It does not make any syscalls nor
allocations, it does not buffer data, it can be interrupted at anytime.
Depending on your architecture, it only requires about 40 bytes of data per
message stream (in a web server that is per connection).")
      (license license:expat))))

(define-public llhttp
  (package
    (name "llhttp")
    (version "9.1.3")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/nodejs/llhttp")
                    (commit (string-append "release/v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1nkv64c5fs8x6n5f9f6g28w5hvg776p55cwa0f82ni548nx279s1"))))
    (build-system cmake-build-system)
    (arguments (list #:tests? #f))      ;FIXME: tests depend on node-mocha
    (home-page "https://github.com/nodejs/llhttp")
    (synopsis "Port of http_parser to llparse")
    (description "@code{llparse} is a port of @code{http_parser} to
@code{llparse} which aims making it more maintainable, verifiable and
efficient where possible.")
    (license license:expat)))

(define-public python-httpretty
  (package
    (name "python-httpretty")
    (version "1.1.4")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "httpretty" version))
       (sha256
        (base32 "0s1vjdaf3pk2xd0hvi5f7p3jm2rgwpbc734jdp9r50m1smfhxpi0"))))
    (build-system python-build-system)
    (arguments
     `(#:tests? #f  ; Tests require network access.
       #:phases
       (modify-phases %standard-phases
         (replace 'check
           (lambda* (#:key tests? #:allow-other-keys)
             (when tests?
               (invoke "nosetests")))))))
    (native-inputs
     (list python-coverage
           python-eventlet
           python-nose
           python-rednose
           python-requests
           python-sure
           python-tornado))
    (home-page "https://httpretty.readthedocs.io")
    (synopsis "HTTP client mock for Python")
    (description "@code{httpretty} is a helper for faking web requests,
inspired by Ruby's @code{fakeweb}.")
    (license license:expat)))

(define-public jo
  (package
    (name "jo")
    (version "1.9")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://github.com/jpmens/jo/releases/download/"
                           version "/jo-" version ".tar.gz"))
       (sha256
        (base32 "17y73657z5v792ik3plcvk9f5g5h2yawv6afahhkq42159pwv581"))))
    (build-system gnu-build-system)
    (home-page "https://github.com/jpmens/jo")
    (synopsis "Output JSON from a shell")
    (description "@command{jo} is a command-line utility to create JSON objects
or arrays.  It creates a JSON string on stdout from words provided as
command-line arguments or read from stdin.")
    (license (list license:gpl2+
                   license:expat)))) ; json.c, json.h

(define-public python-internetarchive
  (package
    (name "python-internetarchive")
    (version "1.8.5")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/jjjake/internetarchive")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32
         "0ih7hplv92wbv6cmgc1gs0v35qkajwicalwcq8vcljw30plr24fp"))
       (modules '((guix build utils)))
       (snippet
        '(begin
           ;; Python 3.7 removed `_pattern_type'.
           (for-each (lambda (file)
                       (chmod file #o644)
                       (substitute* file
                         (("^import re\n" line)
                          (string-append line "re._pattern_type = re.Pattern\n"))))
                     (find-files "." "\\.py$"))
           ;; Mapping got moved to collections.abc
           (substitute* "internetarchive/utils.py"
             (("from collections import Mapping")
              "from collections.abc import Mapping"))))))
    (build-system python-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (delete 'check)
         (add-after 'install 'check
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (add-installed-pythonpath inputs outputs)
             (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
                                           ":" (getenv "PATH")))
             (invoke "py.test" "-v" "-k"
                     (string-append
                      ;; These tests attempt to make a connection to
                      ;; an external web service.
                      "not test_get_item_with_kwargs"
                      " and not test_ia")))))))
    (propagated-inputs
     (list python-requests
           python-jsonpatch-0.4
           python-docopt
           python-clint
           python-six
           python-schema-0.5
           python-backports-csv))
    (native-inputs
     (list python-pytest python-pytest-capturelog python-responses))
    (home-page "https://github.com/jjjake/internetarchive")
    (synopsis "Command-line interface to archive.org")
    (description "@code{ia} is a command-line tool for using
@url{archive.org} from the command-line.  It also implements the
internetarchive python module for programmatic access to archive.org.")
    (license license:agpl3+)))

(define-public python-clf
  (let ((commit-test-clf "d01d25923c599d3261910f79fb948825b4270d07")) ; 0.5.7
    (package
      (name "python-clf")
      (version "0.5.7")
      (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "clf" version))
         (sha256
          (base32
           "0zlkzqnpz7a4iavsq5vaz0nf5nr7qm5znpg1vlpz6rwnx6hikjdb"))))
      (build-system python-build-system)
      (propagated-inputs
       (list python-docopt
             python-pygments
             python-requests
             python-nose
             python-lxml
             python-pyaml))
      (inputs
       `(("test-clf"
          ,(origin
             (method url-fetch)
             (uri (string-append "https://raw.githubusercontent.com"
                                 "/ncrocfer/clf/" commit-test-clf
                                 "/test_clf.py"))
             (sha256
              (base32
               "19lr5zdzsmxgkg7wrjq1yzkiahd03wi4k3dskssyhmjls8c10nqd"))))))
      (arguments
       '(#:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'get-tests
             (lambda _
               (copy-file (assoc-ref %build-inputs "test-clf") "test_clf.py")
               #t))
           (replace 'check
             (lambda _
               (invoke "nosetests"
                       ;; These tests require an Internet connection.
                       "--exclude=test_browse"
                       "--exclude=test_command"
                       "--exclude=test_search"))))))
      (home-page "https://github.com/ncrocfer/clf")
      (synopsis "Search code snippets on @url{https://commandlinefu.com}")
      (description "@code{clf} is a command line tool for searching code
snippets on @url{https://commandlinefu.com}.")
      (license license:expat))))

(define-public nntpit
  (let ((commit "c0d654736460d174a680b2e06c3a81ce883fc09a")
        (revision "0"))
    (package
      (name "nntpit")
      (version (git-version "0" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/taviso/nntpit")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "1kkdh2qpkfw97hzw9jsxy5jzmhhv8261bj63mvr5c9qwlp6qs46g"))))
      (build-system gnu-build-system)
      (native-inputs (list autoconf automake glib pkg-config))
      (inputs (list curl json-c libev))
      (synopsis "Minimal reddit2nntp gateway server")
      (description
       "This is a simple reddit2nntp gateway server that lets you use a newsreader
 to follow discussions on reddit.  The intention is for you to run it locally,
 tell your newsreader to connect to localhost, and subreddits will appear as newsgroups!")
      (home-page "https://github.com/taviso/nntpit")
      (license license:expat))))

(define-public rss-bridge
  (package
    (name "rss-bridge")
    (version "2020-11-10")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/RSS-Bridge/rss-bridge")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1mir6mcm37sbdrhl5kgs6schpp3l4r5mfamhiic0yfbz4hqwmg44"))))
    (build-system copy-build-system)
    (arguments
     '(#:install-plan
       '(("." "share/rss-bridge"))
       #:phases
       (modify-phases %standard-phases
         ;;Change paths to not use source directory.
         (add-before 'install 'patch-paths
           (lambda _
             (substitute* "lib/rssbridge.php"
               (("PATH_ROOT . 'cache/'")
                "'/var/cache/rss-bridge/'")
               (("PATH_ROOT . 'whitelist.txt'")
                "'/etc/rss-bridge/whitelist.txt'")
               (("PATH_ROOT . 'config.ini.php'")
                "'/etc/rss-bridge/config.ini.php'")))))))
    (home-page "https://github.com/RSS-Bridge/rss-bridge")
    (synopsis "Generate Atom feeds for social networking websites")
    (description "rss-bridge generates Atom feeds for social networking
websites lacking feeds.  Supported websites include Facebook, Twitter,
Instagram and YouTube.")
    (license (list license:public-domain
                   license:expat))))    ; vendor/simplehtmldom/simple_html_dom.php

(define-public linkchecker
  (package
    (name "linkchecker")
    (version "10.0.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/linkchecker/linkchecker")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32
         "1j97dc9a4yhpscwadhv5dxp7036pnrxiaky18l8ddr3pvxdjvkxs"))))
    (build-system python-build-system)
    (inputs
     (list python-beautifulsoup4 python-dnspython python-pyxdg
           python-requests))
    (native-inputs
     `(("gettext" ,gettext-minimal)
       ("python-pytest" ,python-pytest)
       ("python-miniboa" ,python-miniboa)
       ("python-parameterized" ,python-parameterized)))
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (replace 'check
           (lambda* (#:key tests? #:allow-other-keys)
             (when tests?
               (invoke "py.test" "tests")))))))
    (home-page "https://linkchecker.github.io/linkchecker/")
    (synopsis "Check websites for broken links")
    (description "LinkChecker is a website validator.  It checks for broken
links in websites.  It is recursive and multithreaded providing output in
colored or normal text, HTML, SQL, CSV, XML or as a sitemap graph.  It
supports checking HTTP/1.1, HTTPS, FTP, mailto, news, nntp, telnet and local
file links.")
    (license (list license:gpl2+
                   license:bsd-2              ; linkcheck/better_exchook2.py
                   license:bsd-3              ; linkcheck/colorama.py
                   license:psfl               ; linkcheck/gzip2.py
                   license:expat))))          ; linkcheck/mem.py

(define-public castor
  (package
    (name "castor")
    (version "0.8.18")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://git.sr.ht/~julienxx/castor")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1l72r6a917ymc9pn8dllbal1xdczfai376nvqkiys5fm4j4s3zmj"))))
    (build-system cargo-build-system)
    (arguments
     `(#:cargo-inputs
       (("rust-ansi-parser" ,rust-ansi-parser-0.6)
        ("rust-dirs" ,rust-dirs-2)
        ("rust-gdk" ,rust-gdk-0.13)
        ("rust-gtk" ,rust-gtk-0.8)
        ("rust-linkify" ,rust-linkify-0.4)
        ("rust-native-tls" ,rust-native-tls-0.2)
        ("rust-open" ,rust-open-1)
        ("rust-percent-encoding" ,rust-percent-encoding-2)
        ("rust-url" ,rust-url-2))))
    (native-inputs
     (list pkg-config))
    (inputs
     (list at-spi2-core
           cairo
           gdk-pixbuf
           gtk+
           openssl-3.0
           pango))
    (home-page "https://git.sr.ht/~julienxx/castor")
    (synopsis "Graphical client for plain-text protocols")
    (description
     "Castor is a graphical client for plain-text protocols written in
Rust with GTK.  It currently supports the Gemini, Gopher and Finger
protocols.")
    (license license:expat)))

(define-public clearsilver
  (package
    (name "clearsilver")
    (version "0.11.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/blong42/clearsilver/")
             (commit "fbe4926ba9a756163fd1539ff6eee3522cf1f5d8")))
       (file-name (git-file-name name version))
       (sha256
        (base32 "02ad43gmqwy7wmh71mh5pk6gl1lax76sjnf42sknj0ijdga170kl"))))
    (build-system gnu-build-system)
    (arguments
     (list
      #:tests? #false ;there is not test target and tests are run during build
      #:configure-flags
      '(list "--disable-java" "--disable-python")
      #:phases
      '(modify-phases %standard-phases
         (add-after 'unpack 'prepare-streamhtmlparser
           (lambda* (#:key inputs #:allow-other-keys)
             (copy-recursively (assoc-ref inputs "streamhtmlparser")
                               (string-append (getcwd) "/streamhtmlparser"))
             (for-each make-file-writable
                       (find-files "streamhtmlparser" "."
                                   #:directories? #t))))
         (add-after 'unpack 'pre-bootstrap
           (lambda _
             ;; We don't need the Java stuff
             (substitute* "configure.in"
               (("AC_JNI_INCLUDE_DIR") ""))

             ;; This script will call /bin/sh, so it's easier to just
             ;; bootstrap manually.
             (delete-file "autogen.sh")
             (substitute* "rules.mk.in"
               (("@PTHREAD_LIBS@") "-lpthread")
               (("@PTHREAD_CFLAGS@") "")
               (("@PTHREAD_CC@") "gcc"))

             ;; The GNU variadic macros actually work, whereas the C99
             ;; implementation fails to build.
             (substitute* "util/neo_misc.h"
               (("#define USE_C99_VARARG_MACROS") "#define USE_GNUC_VARARG_MACROS"))

             (setenv "CFLAGS" "-fPIC")

             ;; This directory is created some time during the build, but the
             ;; early libtool processes assume the directory exists.  When
             ;; they are run first they copy the libraries themselves to the
             ;; file "libs" instead of moving them into the directory.
             (mkdir-p "libs")))
         (add-after 'build 'build-documentation
           (lambda _ (invoke "make" "man")))
         (add-after 'install 'install-streamhtmlparser
           (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
             (with-directory-excursion "streamhtmlparser"
               (apply invoke "make" "-j" (if parallel-build?
                                             (number->string (parallel-job-count))
                                             "1")
                      "install" make-flags)))))))
    (native-inputs
     `(("autoconf" ,autoconf)
       ("automake" ,automake)
       ("libtool" ,libtool)
       ("python" ,python-2)
       ("streamhtmlparser"
        ,(let ((commit "551109ac02a31957a0e776416774c7b515b4b7c7"))
           (origin
             (method git-fetch)
             (uri (git-reference
                   (url "https://github.com/google/streamhtmlparser/")
                   (commit commit)))
             (file-name (git-file-name "streamhtmlparser" commit))
             (sha256
              (base32
               "0bmrdakk930q3m8fmq0xcy7n7cdvlk1xma4z9204919hvb1gk9md")))))))
    (home-page "https://github.com/blong42/clearsilver")
    (synopsis "CGI kit and HTML templating system")
    (description
     "This package includes Clearsilver, the CGI kit and HTML templating
system.")
    (license license:bsd-3)))

(define-public python-py-ubjson
  (package
    (name "python-py-ubjson")
    (version "0.10.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "py-ubjson" version))
       (sha256
        (base32
         "03l9m9w5ip4hw0y69wlys5gzsfb7zcq3a77blj88grgiqhn5vm5n"))))
    (build-system python-build-system)
    (home-page "https://github.com/Iotic-Labs/py-ubjson")
    (synopsis "Universal Binary JSON encoder/decoder")
    (description
     "Py-ubjson is a Python module providing an Universal Binary JSON
encoder/decoder based on the draft-12 specification for UBJSON.")
    (license license:asl2.0)))

(define-public java-tomcat
  (package
    (name "java-tomcat")
    (version "8.5.63")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://apache/tomcat/tomcat-8/v"
                                  version "/src/apache-tomcat-" version "-src.tar.gz"))
              (sha256
               (base32
                "1wr6mpgbk2gs18vp8mdggiq6vifj68a875dd1fkdf7cs31q54rns"))
              (modules '((guix build utils)))
              ;; Delete bundled jars.
              (snippet
               '(begin
                  (for-each delete-file (find-files "." "\\.jar$"))
                  (for-each delete-file (find-files "." "\\.bat$"))
                  #t))))
    (build-system ant-build-system)
    (inputs
     (list java-commons-daemon java-ecj))
    (arguments
     `(#:build-target "deploy"
       #:tests? #f; requires downloading some files.
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'prevent-download
           (lambda _
             ;; This directory must exist
             (mkdir "downloads")
             ;; We patch build.xml so it doesn't download any dependency, because
             ;; we already have all of them.
             (substitute* "build.xml"
               (("download-compile,") "")
               (("depends=\"validate\"") "depends=\"build-prepare\"")
               ((",download-validate") ""))
             #t))
         (add-after 'unpack 'strip-timestamps
           (lambda _
             (substitute* "build.xml"
               (("<filter token=\"YEAR\" value=.*")
                "<filter token=\"YEAR\" value=\"1970\"/>")
               (("<filter token=\"VERSION_BUILT\" value=.*")
                "<filter token=\"VERSION_BUILT\" value=\"Jan 1 1970 00:00:00 UTC\"/>"))
             #t))
         (add-after 'unpack 'modify-deploy
           (lambda _
             ;; The Tomcat build downloads and copies these files to the
             ;; bin and lib directory.
             ;; We instead symlink to the input (see below).
             (substitute* "build.xml"
               (("<copy tofile=\"\\$\\{tomcat.build\\}/bin/commons-daemon.jar.*") "")
               (("<copy file=\"\\$\\{jdt.jar\\}\" todir=\"\\$\\{tomcat.build\\}/lib\"/>")
                ""))
             #t))
         (add-after 'install 'symlink-commons-daemon
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let* ((commons-daemon (assoc-ref inputs "java-commons-daemon"))
                    (files (find-files commons-daemon "commons-daemon-.*\\.jar"))
                    (daemon-jar (car files))
                    (out-bin (string-append (assoc-ref outputs "out") "/bin"))
                    (target (string-append out-bin "/commons-daemon.jar")))
               (symlink daemon-jar target)
               #t)))
         (add-after 'install 'symlink-java-ecj
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let* ((java-ecj (assoc-ref inputs "java-ecj"))
                    (files (find-files java-ecj "ecj.*\\.jar"))
                    (java-ecj-jar (car files))
                    (out-lib (string-append (assoc-ref outputs "out") "/lib"))
                    (target (string-append out-lib "/java-ecj.jar")))
               (symlink java-ecj-jar target)
               #t)))
         (add-after 'unpack 'generate-properties
           (lambda _
             ;; This could have been passed to make-flags, but getcwd returns
             ;; a different directory then.
             (with-output-to-file "build.properties"
               (lambda _
                 (display
                   (string-append "base.path=" (getcwd) "/downloads\n"))))
             #t))
         (replace 'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out")))
               (copy-recursively "output/build" out))
             #t)))))
    (properties '((cpe-name . "tomcat")))
    (home-page "https://tomcat.apache.org")
    (synopsis "Java Servlet, JavaServer Pages, Java Expression Language and Java
WebSocket")
    (description "Apache Tomcat is a free implementation of the Java
Servlet, JavaServer Pages, Java Expression Language and Java WebSocket
technologies.")
    (license license:asl2.0)))

(define-public java-eclipse-jetty-test-helper
  (package
    (name "java-eclipse-jetty-test-helper")
    (version "4.2")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                     (url "https://github.com/eclipse/jetty.toolchain/")
                     (commit (string-append "jetty-test-helper-" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1g7cdh03nfwbdxzvwm84ysgvw08xx7431lsjryj2gmf3lrqpizgb"))))
    (build-system ant-build-system)
    (arguments
     `(#:jar-name "eclipse-jetty-test-helper.jar"
       #:source-dir "src/main/java"
       #:test-dir "src/test"
       #:jdk ,icedtea-8
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'chdir
           (lambda _
             (chdir "jetty-test-helper")
             #t))
         (add-before 'build 'fix-paths
           (lambda _
             ;; TODO:
             ;; This file assumes that the build directory is named "target"
             ;; but it is not the case with our ant-build-system. Once we have
             ;; maven though, we will have to rebuild this package because this
             ;; assumption is correct with maven-build-system.
             (substitute*
               "src/main/java/org/eclipse/jetty/toolchain/test/MavenTestingUtils.java"
               (("\"target\"") "\"build\"")
               (("\"tests\"") "\"test-classes\""))
             ;; Tests assume we are building with maven, so that the build
             ;; directory is named "target", and not "build".
             (with-directory-excursion "src/test/java/org/eclipse/jetty/toolchain/test"
               (substitute* '("FSTest.java" "OSTest.java" "TestingDirTest.java"
                              "MavenTestingUtilsTest.java")
                 (("target/tests") "build/test-classes")
                 (("\"target") "\"build")))
             #t)))))
    (inputs
     `(("junit" ,java-junit)
       ("hamcrest" ,java-hamcrest-all)))
    (home-page "https://www.eclipse.org/jetty/")
    (synopsis "Helper classes for jetty tests")
    (description "This package contains helper classes for testing the Jetty
Web Server.")
    ;; This program is licensed under both epl and asl.
    (license (list license:epl1.0 license:asl2.0))))

(define-public java-eclipse-jetty-perf-helper
  (package
    (inherit java-eclipse-jetty-test-helper)
    (name "java-eclipse-jetty-perf-helper")
    (arguments
     `(#:jar-name "eclipse-jetty-perf-helper.jar"
       #:source-dir "src/main/java"
       #:tests? #f; no tests
       #:jdk ,icedtea-8
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'chdir
           (lambda _
             (chdir "jetty-perf-helper")
             #t)))))
    (inputs
     `(("hdrhistogram" ,java-hdrhistogram)))))

(define-public java-eclipse-jetty-util
  (package
    (name "java-eclipse-jetty-util")
    (version "9.4.39")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/eclipse/jetty.project/"
                                  "archive/jetty-" version ".v20210325.tar.gz"))
              (sha256
               (base32
                "0b4hy4zmdmfbqk9bzmxk7v75y2ysqiappkip4z3hb9lxjvjh0b19"))))
    (build-system ant-build-system)
    (arguments
     `(#:jar-name "eclipse-jetty-util.jar"
       #:source-dir "src/main/java"
       #:tests? #f; require junit 5
       #:test-exclude
       (list "**/Abstract*.java"
             ;; requires network
             "**/InetAddressSetTest.java"
             ;; Assumes we are using maven
             "**/TypeUtilTest.java"
             ;; Error on the style of log
             "**/StdErrLogTest.java")
       #:jdk ,icedtea-8
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'chdir
           (lambda _
             (chdir "jetty-util")
             #t)))))
    (inputs
     `(("slf4j" ,java-slf4j-api)
       ("servlet" ,java-javaee-servletapi)))
    (home-page "https://www.eclipse.org/jetty/")
    (synopsis "Utility classes for Jetty")
    (description "The Jetty Web Server provides an HTTP server and Servlet
container capable of serving static and dynamic content either from a standalone
or embedded instantiation.  This package provides utility classes.")
    (license (list license:epl1.0 license:asl2.0))))

;; This version is required by maven-wagon
(define-public java-eclipse-jetty-util-9.2
  (package
    (inherit java-eclipse-jetty-util)
    (version "9.2.22")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/eclipse/jetty.project/"
                                  "archive/jetty-" version ".v20170606.tar.gz"))
              (sha256
               (base32
                "1i51qlsd7h06d35kx5rqpzbfadbcszycx1iwr6vz7qc9gf9f29la"))))
    (arguments
     `(#:jar-name "eclipse-jetty-util.jar"
       #:source-dir "src/main/java"
       #:jdk ,icedtea-8
       #:test-exclude
       (list "**/Abstract*.java"
             ;; requires network
             "**/InetAddressSetTest.java"
             ;; Assumes we are using maven
             "**/TypeUtilTest.java"
             ;; We don't have an implementation for slf4j
             "**/LogTest.java"
             ;; Error on the style of log
             "**/StdErrLogTest.java")
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'chdir
           (lambda _
             (chdir "jetty-util")
             #t))
         (add-before 'build 'fix-test-sources
           (lambda _
             ;; We need to fix issues caused by changes in newer versions of
             ;; jetty-test-helper
             (let ((src "src/test/java/org/eclipse/jetty/util/resource"))
               (substitute* (string-append src "/AbstractFSResourceTest.java")
                 (("testdir.getDir\\(\\)") "testdir.getPath().toFile()")
                 (("testdir.getFile\\(\"foo\"\\)")
                  "testdir.getPathFile(\"foo\").toFile()")
                 (("testdir.getFile\\(name\\)")
                  "testdir.getPathFile(name).toFile()")))
             #t)))))
    (native-inputs
     `(("java-junit" ,java-junit)
       ("java-hamcrest-all" ,java-hamcrest-all)
       ("perf-helper" ,java-eclipse-jetty-perf-helper)
       ("test-helper" ,java-eclipse-jetty-test-helper)))))

(define-public java-eclipse-jetty-io
  (package
    (inherit java-eclipse-jetty-util)
    (name "java-eclipse-jetty-io")
    (arguments
     `(#:jar-name "eclipse-jetty-io.jar"
       #:source-dir "src/main/java"
       #:jdk ,icedtea-8
       #:tests? #f; require junit 5
       #:test-exclude (list "**/Abstract*.java"
                            ;; Abstract class
                            "**/EndPointTest.java")
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'chdir
           (lambda _
             (chdir "jetty-io")
             #t)))))
    (inputs
     `(("slf4j" ,java-slf4j-api)
       ("servlet" ,java-javaee-servletapi)
       ("util" ,java-eclipse-jetty-util)))
    (synopsis "Jetty :: IO Utility")
    (description "The Jetty Web Server provides an HTTP server and Servlet
container capable of serving static and dynamic content either from a standalone
or embedded instantiation.  This package provides IO-related utility classes.")))

(define-public java-eclipse-jetty-io-9.2
  (package
    (inherit java-eclipse-jetty-io)
    (version (package-version java-eclipse-jetty-util-9.2))
    (source (package-source java-eclipse-jetty-util-9.2))
    (inputs
     `(("util" ,java-eclipse-jetty-util-9.2)
       ,@(package-inputs java-eclipse-jetty-util-9.2)))
    (native-inputs
     `(("mockito" ,java-mockito-1)
       ("cglib" ,java-cglib)
       ("objenesis" ,java-objenesis)
       ("asm" ,java-asm)
       ,@(package-native-inputs java-eclipse-jetty-util-9.2)))))

(define-public java-eclipse-jetty-http
  (package
    (inherit java-eclipse-jetty-util)
    (name "java-eclipse-jetty-http")
    (arguments
     `(#:jar-name "eclipse-jetty-http.jar"
       #:source-dir "src/main/java"
       #:jdk ,icedtea-8
       #:tests? #f; require junit 5
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'chdir
           (lambda _
             (chdir "jetty-http")
             #t))
         (add-before 'build 'copy-resources
           (lambda _
             (mkdir-p "build/classes")
             (copy-recursively "src/main/resources/" "build/classes/")
             #t)))))
    (inputs
     `(("slf4j" ,java-slf4j-api)
       ("servlet" ,java-javaee-servletapi)
       ("io" ,java-eclipse-jetty-io)
       ("util" ,java-eclipse-jetty-util)))
    (synopsis "Jetty :: Http Utility")
    (description "The Jetty Web Server provides an HTTP server and Servlet
container capable of serving static and dynamic content either from a standalone
or embedded instantiation.  This package provides HTTP-related utility classes.")))

(define-public java-eclipse-jetty-http-9.2
  (package
    (inherit java-eclipse-jetty-http)
    (version (package-version java-eclipse-jetty-util-9.2))
    (source (package-source java-eclipse-jetty-util-9.2))
    (inputs
     `(("util" ,java-eclipse-jetty-util-9.2)
       ("io" ,java-eclipse-jetty-io-9.2)
       ,@(package-inputs java-eclipse-jetty-util-9.2)))))

(define-public java-eclipse-jetty-jmx
  (package
    (inherit java-eclipse-jetty-util)
    (name "java-eclipse-jetty-jmx")
    (arguments
     `(#:jar-name "eclipse-jetty-jmx.jar"
       #:source-dir "src/main/java"
       #:jdk ,icedtea-8
       #:tests? #f; FIXME: requires com.openpojo.validation
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'chdir
           (lambda _
             (chdir "jetty-jmx")
             #t)))))
    (inputs
     `(("slf4j" ,java-slf4j-api)
       ("servlet" ,java-javaee-servletapi)
       ("util" ,java-eclipse-jetty-util)))
    (synopsis "Jetty :: JMX Management")
    (description "The Jetty Web Server provides an HTTP server and Servlet
container capable of serving static and dynamic content either from a standalone
or embedded instantiation.  This package provides the JMX management.")))

(define-public java-eclipse-jetty-jmx-9.2
  (package
    (inherit java-eclipse-jetty-jmx)
    (version (package-version java-eclipse-jetty-util-9.2))
    (source (package-source java-eclipse-jetty-util-9.2))
    (inputs
     `(("util" ,java-eclipse-jetty-util-9.2)
       ,@(package-inputs java-eclipse-jetty-util-9.2)))))

(define java-eclipse-jetty-http-test-classes
  (package
    (inherit java-eclipse-jetty-util)
    (name "java-eclipse-jetty-http-test-classes")
    (arguments
     `(#:jar-name "eclipse-jetty-http.jar"
       #:source-dir "src/test"
       #:tests? #f
       #:jdk ,icedtea-8
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'chdir
           (lambda _
             (chdir "jetty-http")
             #t)))))
    (inputs
     `(("slf4j" ,java-slf4j-api)
       ("java-javaee-servletapi" ,java-javaee-servletapi)
       ("http" ,java-eclipse-jetty-http)
       ("io" ,java-eclipse-jetty-io)
       ("util" ,java-eclipse-jetty-util)))))

(define java-eclipse-jetty-http-test-classes-9.2
  (package
    (inherit java-eclipse-jetty-http-test-classes)
    (version (package-version java-eclipse-jetty-util-9.2))
    (source (package-source java-eclipse-jetty-util-9.2))
    (inputs
     `(("http" ,java-eclipse-jetty-http-9.2)
       ,@(package-inputs java-eclipse-jetty-http-9.2)))
    (native-inputs (package-native-inputs java-eclipse-jetty-util-9.2))))

(define-public java-eclipse-jetty-server
  (package
    (inherit java-eclipse-jetty-util)
    (name "java-eclipse-jetty-server")
    (arguments
     `(#:jar-name "eclipse-jetty-server.jar"
       #:source-dir "src/main/java"
       #:jdk ,icedtea-8
       #:tests? #f; requires a mockito version we don't have
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'chdir
           (lambda _
             (chdir "jetty-server")
             #t))
         (add-before 'build 'fix-source
           (lambda _
             ;; Explicit casts to prevent build failures
             (substitute* "src/main/java/org/eclipse/jetty/server/Request.java"
               (("append\\(LazyList")
                "append((CharSequence)LazyList"))
             (substitute*
               "src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java"
               (((string-append
                   "Class<\\? extends EventListener> clazz = _classLoader==null"
                   "\\?Loader.loadClass\\(ContextHandler.class,className\\):"
                   "_classLoader.loadClass\\(className\\);"))
                (string-append "Class<? extends EventListener> clazz = "
                               "(Class<? extends EventListener>) "
                               "(_classLoader==null?Loader.loadClass("
                               "ContextHandler.class,className):"
                               "_classLoader.loadClass(className));")))
             #t)))))
    (inputs
     `(("slf4j" ,java-slf4j-api)
       ("servlet" ,java-javaee-servletapi)
       ("http" ,java-eclipse-jetty-http)
       ("io" ,java-eclipse-jetty-io)
       ("jmx" ,java-eclipse-jetty-jmx)
       ("util" ,java-eclipse-jetty-util)))
    (synopsis "Core jetty server artifact")
    (description "The Jetty Web Server provides an HTTP server and Servlet
container capable of serving static and dynamic content either from a standalone
or embedded instantiation.  This package provides the core jetty server
artifact.")))

(define-public java-eclipse-jetty-server-9.2
  (package
    (inherit java-eclipse-jetty-server)
    (version (package-version java-eclipse-jetty-util-9.2))
    (source (package-source java-eclipse-jetty-util-9.2))
    (inputs
     `(("util" ,java-eclipse-jetty-util-9.2)
       ("jmx" ,java-eclipse-jetty-jmx-9.2)
       ("io" ,java-eclipse-jetty-io-9.2)
       ("http" ,java-eclipse-jetty-http-9.2)
       ,@(package-inputs java-eclipse-jetty-util-9.2)))
    (native-inputs
     `(("test-classes" ,java-eclipse-jetty-http-test-classes-9.2)
       ,@(package-native-inputs java-eclipse-jetty-util-9.2)))))

(define-public java-eclipse-jetty-security
  (package
    (inherit java-eclipse-jetty-util)
    (name "java-eclipse-jetty-security")
    (arguments
     `(#:jar-name "eclipse-jetty-security.jar"
       #:source-dir "src/main/java"
       #:jdk ,icedtea-8
       #:tests? #f; require junit 5
       #:test-exclude (list "**/ConstraintTest.*") ; This test fails
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'chdir
           (lambda _
             (chdir "jetty-security")
             #t)))))
    (inputs
     `(("slf4j" ,java-slf4j-api)
       ("servlet" ,java-javaee-servletapi)
       ("http" ,java-eclipse-jetty-http)
       ("server" ,java-eclipse-jetty-server)
       ("util" ,java-eclipse-jetty-util)))
    (synopsis "Jetty security infrastructure")
    (description "The Jetty Web Server provides an HTTP server and Servlet
container capable of serving static and dynamic content either from a standalone
or embedded instantiation.  This package provides the core jetty security
infrastructure")))

(define-public java-eclipse-jetty-security-9.2
  (package
    (inherit java-eclipse-jetty-security)
    (version (package-version java-eclipse-jetty-util-9.2))
    (source (package-source java-eclipse-jetty-util-9.2))
    (inputs
     `(("util" ,java-eclipse-jetty-util-9.2)
       ("http" ,java-eclipse-jetty-http-9.2)
       ("server" ,java-eclipse-jetty-server-9.2)
       ,@(package-inputs java-eclipse-jetty-util-9.2)))
    (native-inputs
     `(("io" ,java-eclipse-jetty-io-9.2)
       ,@(package-native-inputs java-eclipse-jetty-util-9.2)))))

(define-public java-eclipse-jetty-util-ajax
  (package
    (inherit java-eclipse-jetty-util)
    (name "java-eclipse-jetty-util-ajax")
    (arguments
     `(#:jar-name "eclipse-jetty-util-ajax.jar"
       #:source-dir "jetty-util-ajax/src/main/java"
       #:tests? #f)); require junit 5
    (inputs
     (list java-eclipse-jetty-util java-javaee-servletapi))))

(define-public java-eclipse-jetty-servlet
  (package
    (inherit java-eclipse-jetty-util)
    (name "java-eclipse-jetty-servlet")
    (arguments
     `(#:jar-name "eclipse-jetty-servlet.jar"
       #:source-dir "src/main/java"
       #:jdk ,icedtea-8
       #:tests? #f; require junit 5
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'chdir
           (lambda _
             (chdir "jetty-servlet")
             #t)))))
    (inputs
     `(("slf4j" ,java-slf4j-api)
       ("java-javaee-servletapi" ,java-javaee-servletapi)
       ("java-eclipse-jetty-util-ajax" ,java-eclipse-jetty-util-ajax)
       ("http" ,java-eclipse-jetty-http)
       ("io" ,java-eclipse-jetty-io)
       ("jmx" ,java-eclipse-jetty-jmx)
       ("security" ,java-eclipse-jetty-security)
       ("server" ,java-eclipse-jetty-server)
       ("util" ,java-eclipse-jetty-util)))
    (synopsis "Jetty Servlet Container")
    (description "The Jetty Web Server provides an HTTP server and Servlet
container capable of serving static and dynamic content either from a standalone
or embedded instantiation.  This package provides the core jetty servlet
container.")))

(define-public java-eclipse-jetty-servlet-9.2
  (package
    (inherit java-eclipse-jetty-servlet)
    (version (package-version java-eclipse-jetty-util-9.2))
    (source (package-source java-eclipse-jetty-util-9.2))
    (arguments
     `(#:jar-name "eclipse-jetty-servlet.jar"
       #:source-dir "src/main/java"
       #:jdk ,icedtea-8
       #:tests? #f; doesn't work
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'chdir
           (lambda _
             (chdir "jetty-servlet")
             #t)))))
    (inputs
     `(("util" ,java-eclipse-jetty-util-9.2)
       ("jmx" ,java-eclipse-jetty-jmx-9.2)
       ("io" ,java-eclipse-jetty-io-9.2)
       ("http" ,java-eclipse-jetty-http-9.2)
       ("security" ,java-eclipse-jetty-security-9.2)
       ("http-test" ,java-eclipse-jetty-http-test-classes-9.2)
       ("server" ,java-eclipse-jetty-server-9.2)
       ,@(package-inputs java-eclipse-jetty-util-9.2)))))

(define-public java-eclipse-jetty-xml
  (package
    (inherit java-eclipse-jetty-util)
    (name "java-eclipse-jetty-xml")
    (arguments
     `(#:jar-name "eclipse-jetty-xml.jar"
       #:source-dir "src/main/java"
       #:jdk ,icedtea-8
       #:tests? #f; most tests require network
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'chdir
           (lambda _
             (chdir "jetty-xml")
             #t)))))
    (inputs
     (list java-eclipse-jetty-util))
    (native-inputs
     (modify-inputs (package-native-inputs java-eclipse-jetty-util)
       (prepend java-eclipse-jetty-io)))))

(define-public java-eclipse-jetty-xml-9.2
  (package
    (inherit java-eclipse-jetty-xml)
    (version (package-version java-eclipse-jetty-util-9.2))
    (source (package-source java-eclipse-jetty-util-9.2))
    (arguments
     `(#:jar-name "eclipse-jetty-xml.jar"
       #:source-dir "src/main/java"
       #:jdk ,icedtea-8
       #:tests? #f; most tests require network
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'chdir
           (lambda _
             (chdir "jetty-xml")
             #t)))))
    (inputs
     `(("java-eclipse-jetty-util-9.2" ,java-eclipse-jetty-util-9.2)
       ,@(package-inputs java-eclipse-jetty-util-9.2)))
    (native-inputs
     `(("java-eclipse-jetty-io-9.2" ,java-eclipse-jetty-io-9.2)
       ,@(package-native-inputs java-eclipse-jetty-util-9.2)))))

(define-public java-eclipse-jetty-webapp
  (package
    (inherit java-eclipse-jetty-util)
    (name "java-eclipse-jetty-webapp")
    (arguments
     `(#:jar-name "eclipse-jetty-webapp.jar"
       #:source-dir "src/main/java"
       #:jdk ,icedtea-8
       #:tests? #f; require junit 5
       ;; One test fails
       #:test-exclude (list "**/WebAppContextTest.java")
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'chdir
           (lambda _
             (chdir "jetty-webapp")
             #t)))))
    (inputs
     (list java-eclipse-jetty-util
           java-eclipse-jetty-http
           java-eclipse-jetty-io
           java-eclipse-jetty-server
           java-eclipse-jetty-servlet
           java-eclipse-jetty-security
           java-eclipse-jetty-xml
           java-javaee-servletapi))))

(define-public java-eclipse-jetty-webapp-9.2
  (package
    (inherit java-eclipse-jetty-webapp)
    (version (package-version java-eclipse-jetty-util-9.2))
    (source (package-source java-eclipse-jetty-util-9.2))
    (arguments
     `(#:jar-name "eclipse-jetty-webapp.jar"
       #:source-dir "src/main/java"
       #:jdk ,icedtea-8
       #:test-exclude (list "**/WebAppContextTest.java")
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'chdir
           (lambda _
             (chdir "jetty-webapp")
             #t)))))
    (inputs
     `(("java-eclipse-jetty-util-9.2" ,java-eclipse-jetty-util-9.2)
       ("java-eclipse-jetty-http-9.2" ,java-eclipse-jetty-http-9.2)
       ("java-eclipse-jetty-server-9.2" ,java-eclipse-jetty-server-9.2)
       ("java-eclipse-jetty-servlet-9.2" ,java-eclipse-jetty-servlet-9.2)
       ("java-eclipse-jetty-security-9.2" ,java-eclipse-jetty-security-9.2)
       ("java-eclipse-jetty-xml-9.2" ,java-eclipse-jetty-xml-9.2)
       ("java-javaee-servletapi" ,java-javaee-servletapi)
       ,@(package-inputs java-eclipse-jetty-util-9.2)))
    (native-inputs
     `(("java-eclipse-jetty-io-9.2" ,java-eclipse-jetty-io-9.2)
       ,@(package-native-inputs java-eclipse-jetty-util-9.2)))))

(define-public java-jsoup
  (package
    (name "java-jsoup")
    (version "1.10.3")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                     (url "https://github.com/jhy/jsoup")
                     (commit (string-append "jsoup-" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1hdpdx0x140r5x3yc251v7dj1h4j5a7nh9k885aw9q5vvz49lkf4"))))
    (build-system ant-build-system)
    (arguments
     `(#:jar-name "jsoup.jar"
       #:source-dir "src/main/java"
       #:phases
       (modify-phases %standard-phases
         (add-before 'build 'copy-resources
           (lambda _
             (let ((classes-dir (string-append (getcwd) "/build/classes")))
               (with-directory-excursion "src/main/java"
                 (for-each (lambda (file)
                             (let ((dist (string-append classes-dir "/" file)))
                               (mkdir-p (dirname dist))
                               (copy-file file dist)))
                   (find-files "." ".*.properties"))))
             #t)))))
    (native-inputs
     (list java-junit java-hamcrest-core java-gson))
    (home-page "https://jsoup.org")
    (synopsis "HTML parser")
    (description "Jsoup is a Java library for working with real-world HTML.  It
provides a very convenient API for extracting and manipulating data, using the
best of DOM, CSS, and jQuery-like methods.")
    (license license:expat)))

(define-public java-signpost-core
  (package
    (name "java-signpost-core")
    (version "1.2.1.2")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                     (url "https://github.com/mttkay/signpost")
                     (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1l04yj2znch3hpyw90c4g4jan453w7d88l84bgl0c72i2kbb8z7h"))))
    (build-system ant-build-system)
    (arguments
     `(#:jar-name "signpost-core.jar"
       #:source-dir "signpost-core/src/main/java"
       #:test-dir "signpost-core/src/test"
       ;; Tests all fail with InstantiationException from mockito
       #:tests? #f))
    (propagated-inputs
     (list java-commons-codec))
    (home-page "https://github.com/mttkay/signpost")
    (synopsis "Lightweight client-side OAuth library for Java")
    (description "Signpost is the easy and intuitive solution for signing
HTTP messages on the Java platform in conformance with the OAuth Core 1.0a
standard.  Signpost follows a modular and flexible design, allowing you to
combine it with different HTTP messaging layers.")
    (license license:asl2.0)))

(define-public tidyp
  (package
    (name "tidyp")
    (version "1.04")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://github.com/downloads/petdance/tidyp/tidyp-"
                           version ".tar.gz"))
       (sha256
        (base32
         "0f5ky0ih4vap9c6j312jn73vn8m2bj69pl2yd3a5nmv35k9zmc10"))))
    (build-system gnu-build-system)
    ;; ./test-thing.sh tries to run ./testall.sh, which is not included.
    (arguments `(#:tests? #f))
    (home-page "http://www.tidyp.com/")
    (synopsis "Validate HTML")
    (description "Tidyp is a program that can validate your HTML, as well as
modify it to be more clean and standard.  tidyp does not validate HTML 5.

libtidyp is the library on which the program is based.  It can be used by any
other program that can interface to it.  The Perl module @code{HTML::Tidy} is
based on this library, allowing Perl programmers to easily validate HTML.")
    ;; See htmldoc/license.html
    (license license:bsd-3)))

(define-public perl-html-tidy
  (package
    (name "perl-html-tidy")
    (version "1.60")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "mirror://cpan/authors/id/P/PE/PETDANCE/HTML-Tidy-"
                           version ".tar.gz"))
       (sha256
        (base32
         "1iyp2fd6j75cn1xvcwl2lxr8qpjxssy2360cyqn6g3kzd1fzdyxw"))))
    (build-system perl-build-system)
    (arguments
     '(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'fix-tidyp-paths
           (lambda* (#:key inputs #:allow-other-keys)
             (substitute* "Makefile.PL"
               (("^my \\$inc = \"" line)
                (string-append line
                               "-I" (assoc-ref inputs "tidyp") "/include/tidyp "))
               (("-L/usr/lib")
                (string-append
                 "-L" (assoc-ref inputs "tidyp") "/lib")))
             #t)))))
    (inputs
     (list perl-libwww tidyp))
    (native-inputs
     (list perl-test-exception))
    (home-page "https://metacpan.org/release/HTML-Tidy")
    (synopsis "(X)HTML validation in a Perl object")
    (description "@code{HTML::Tidy} is an HTML checker in a handy dandy
object.  It's meant as a replacement for @code{HTML::Lint}, which is written
in Perl but is not nearly as capable as @code{HTML::Tidy}.")
    (license license:artistic2.0)))

(define-public gophernicus
  ;; Contains some unreleased fixes.
  (let ((commit "da3390089c2a856db1ab2e3bd9751b9a9101a33a")
        (revision "0"))
    (package
      (name "gophernicus")
      (version (git-version "3.1.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/gophernicus/gophernicus")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0a7kpymwqcsqzszdxvcqppbg61bpyg9f7raj783pldm4kf2wjyij"))))
      (build-system gnu-build-system)
      (arguments
       (list #:tests? #f                ; No tests
             #:configure-flags
             ;; Listener and hostname used only in configuration files, which
             ;; we don't install.
             ;; This is what's done in the release.sh script.
             #~(list "--listener=none" "--hostname=HOSTNAME")
             #:phases
             #~(modify-phases %standard-phases
                 (add-after 'unpack 'fix-version
                   (lambda _
                     (substitute* "Makefile.in"
                       (("^(VERSION += ).*" _ prefix)
                        (string-append prefix #$version "\n")))
                     ;; This is done in the release.sh script.
                     (substitute* "README.md"
                       (("^(This release: Version )DEVEL\\b.*" _ prefix)
                        (string-append prefix #$version "\n"))
                       (("^NOTE: The master branch is rolling Development\\b.*")
                        ""))))
                 (replace 'configure
                   ;; The configure script is hand-written, not from GNU autotools.
                   (lambda* (#:key configure-flags #:allow-other-keys)
                     (setenv "CC" #$(cc-for-target))
                     (setenv "HOSTCC" "gcc")
                     (apply invoke "./configure"
                            (string-append "--prefix=" #$output)
                            configure-flags))))))
      ;; TODO: Make configure script find libwrap.
      ;;(inputs
      ;; (list tcp-wrappers))
      (home-page "https://gophernicus.org/")
      (synopsis "Gopher protocol server")
      (description
       "Gophernicus is a Gopher protocol server.  Its features include:
@itemize
@item written with security in mind;
@item automatically generated Gopher menus;
@item gophertags for virtually renaming directories;
@item personal gopherspaces, located in @file{~/public_gopher/};
@item virtual hosting;
@item CGI support;
@item output filtering and PHP support;
@item charset support and conversions;
@item selector rewriting;
@item session tracking and statistics;
@item TLS/SSL and proxy support.
@end itemize")
      (license license:bsd-2))))

(define-public gemget
  (package
    (name "gemget")
    (version "1.9.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/makew0rld/gemget")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "03x9apk73lwyafc4fd2vs033z7vcpk4k0jf97452l7pnlx2v57rz"))))
    (build-system go-build-system)
    (native-inputs
     (list go-github-com-dustin-go-humanize
           go-github-com-makeworld-the-better-one-go-gemini
           go-github-com-makeworld-the-better-one-go-gemini-socks5
           go-github-com-schollz-progressbar-v3
           go-github-com-spf13-pflag))
    (arguments
     (list
      #:install-source? #f
      #:import-path "github.com/makeworld-the-better-one/gemget"))
    (home-page "https://github.com/makew0rld/gemget")
    (synopsis "Command line downloader for the Gemini protocol")
    (description
     "Gemget is a command line downloader for the Gemini protocol.
It works well with streams and can print headers for debugging as well.")
    (license license:expat)))

(define-public geomyidae
  (package
    (name "geomyidae")
    (version "0.34")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "git://r-36.net/geomyidae")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "02afgrk36wkdkflyqr2xgh49v9zq6ma454jshk7igvhpxfb5l3ks"))))
    (build-system gnu-build-system)
    (arguments
     `(#:make-flags (list "CC=gcc"
                          (string-append "PREFIX="
                                         (assoc-ref %outputs "out")))
       #:tests? #f                      ; no tests
       #:phases (modify-phases %standard-phases
                  (delete 'configure))))
    (home-page "http://r-36.net/scm/geomyidae/file/README.html")
    (synopsis "Small Gopher server")
    (description
     "Geomyidae is a server for distributed hypertext protocol Gopher.  Its
features include:

@enumerate
@item Gopher menus (see @file{index.gph} for an example);
@item directory listings (if no @file{index.gph} was found);
@item CGI support (@file{.cgi} files are executed);
@item search support in CGI files;
@item logging with multiple log levels.
@end enumerate\n")
    (license license:expat)))

(define-public monsterid
  (let ((commit "5597f177b473343ff5cad9a6e0e5b255312c6096")
        (revision "0"))
    (package
      (name "monsterid")
      (version (git-version "0" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/splitbrain/monsterID")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "0ixyrrcbw96plcdna2rx1pqwisqy9hnr57kvamgj13lzlv2whdb3"))))
      (build-system copy-build-system)
      (arguments
       '(#:install-plan '(("monsterid.php" "share/web/monsterid/")
                          ("parts/" "share/web/monsterid/parts/"
                           #:include-regexp ("\\.png$")))))
      (home-page "https://www.splitbrain.org/projects/monsterid")
      (synopsis "The original MonsterID implementation")
      (description
       "MonsterID is a method to generate a unique monster image based upon a
certain identifier (IP address, email address, whatever).  It can be
used to automatically provide personal avatar images in blog comments
or other community services.")
      (license license:expat))))

(define-public cat-avatar-generator
  (let ((commit "9360ea33f79d1dad3e43494b09878b5e3f6b41fa")
        (revision "1"))
    (package
      (name "cat-avatar-generator")
      (version (git-version "1" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://framagit.org/Deevad/cat-avatar-generator.git")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "0js4grqzsm4gvmcbmxv7zw4samfzi6nk4mn977ddcvla9g222rkm"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
         #:builder
         (begin
           (use-modules (guix build utils)
                        (srfi srfi-1)
                        (srfi srfi-26))
           (let ((source (assoc-ref %build-inputs "source"))
                 (php-dir (string-append %output "/share/web/" ,name)))
             (install-file (string-append source "/cat-avatar-generator.php") php-dir)
             (copy-recursively (string-append source "/avatars") (string-append php-dir "/avatars"))
             ;; The cache directory must not be in the store, but in a writable
             ;; location.  The webserver will give us this location.
             (substitute* (string-append php-dir "/cat-avatar-generator.php")
               (("\\$cachepath = .*")
                "if(isset($_SERVER['CACHE_DIR']))
$cachepath = $_SERVER['CACHE_DIR'];
else
die('You need to set the CACHE_DIR variable first.');"))
             #t))))
      (home-page "https://framagit.org/Deevad/cat-avatar-generator")
      (synopsis "Random avatar generator")
      (description "Cat avatar generator is a generator of cat pictures optimised
to generate random avatars, or defined avatar from a \"seed\".  This is a
derivation by David Revoy from the original MonsterID by Andreas Gohr.")
      ;; expat for the code, CC-BY 4.0 for the artwork
      (license (list license:expat
                     license:cc-by4.0)))))

(define-public nghttp2
  (package
    (name "nghttp2")
    (version "1.58.0")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://github.com/nghttp2/nghttp2/"
                           "releases/download/v" version "/"
                           "nghttp2-" version ".tar.xz"))
       (sha256
        (base32
         "1q4ps8acr7nyia7mf2z11m0yh3fn1imhyv855j3xjbx91l2a6s2a"))))
    (build-system gnu-build-system)
    (outputs (list "out"
                   "lib"))              ; only libnghttp2
    (native-inputs
     (list pkg-config
           ;; Required by tests.
           cunit python tzdata-for-tests))
    (inputs
     ;; Required to build the tools (i.e. without ‘--enable-lib-only’).
     (append
      (if (target-hurd?)
          `((,openssl "static"))
          (list jemalloc))              ; fight nghttpd{,x} heap fragmentation
      (list c-ares
            jansson                     ; for HPACK tools
            libev
            libxml2                     ; for ‘nghttp -a’
            openssl)))
    (arguments
     (list
      #:configure-flags
      #~(list (string-append "--libdir=" #$output:lib "/lib")
              "--enable-app"            ; build all the tools
              "--enable-hpack-tools"    ; ...all the tools
              "--disable-examples"
              "--disable-static"        ; don't bother building .a files
              #$@(if (%current-target-system)
                     '("--disable-python-bindings")
                     '()))
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'break-circular-reference
            ;; libnghttp2.pc by default retains a reference to the ‘out’ output,
            ;; which is not allowed.  Break this cycle.  While we could install
            ;; only the library to ‘out’ and move everything else to a separate
            ;; output, this would inconvenience the majority of (human) users.
            (lambda _
              (substitute* "lib/libnghttp2.pc.in"
                (("@prefix@")
                 #$output:lib))))
          (add-before 'check 'set-timezone-directory
            (lambda* (#:key inputs native-inputs #:allow-other-keys)
              (setenv "TZDIR" (search-input-directory
                               (or native-inputs inputs)
                               "share/zoneinfo")))))))
    (home-page "https://nghttp2.org/")
    (synopsis "HTTP/2 protocol client, proxy, server, and library")
    (description
     "nghttp2 implements the Hypertext Transfer Protocol, version
2 (@dfn{HTTP/2}).

A reusable C library provides the HTTP/2 framing layer, with several tools built
on top of it:

@itemize
@item @command{nghttp}, a command-line HTTP/2 client.  It exposes many advanced
and low-level aspects of the protocol and is useful for debugging.
@item @command{nghttpd}, a fast, multi-threaded HTTP/2 static web server that
serves files from a local directory.
@item @command{nghttpx}, a fast, multi-threaded HTTP/2 reverse proxy that can be
deployed in front of existing web servers that don't support HTTP/2.
Both @command{nghttpd} and @command{nghttpx} can fall back to HTTP/1.1 for
backwards compatibility with clients that don't speak HTTP/2.
@item @command{h2load} for benchmarking (only!) your own HTTP/2 servers.
@item HTTP/2 uses a header compression method called @dfn{HPACK}.
nghttp2 provides a HPACK encoder and decoder as part of its public API.
@item @command{deflatehd} converts JSON data or HTTP/1-style header fields to
compressed JSON header blocks.
@item @command{inflatehd} converts such compressed headers back to JSON pairs.
@end itemize\n")
    (license license:expat)))

;; Older variant for Node versions < 17 (upstream commit 43291b98edaa682
;; add support for newer nghttp2, but is difficult to backport).
(define-public nghttp2-for-node
  (hidden-package
   (package
     (inherit nghttp2)
     (version "1.44.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/nghttp2/nghttp2/"
                                   "releases/download/v" version "/"
                                   "nghttp2-" version ".tar.xz"))
               (sha256
                (base32
                 "0p9wvva4g8hwj55x19rbyvnq2dbsnf65rphhxnpqs7ll54xlg6an"))))
     (arguments
      (substitute-keyword-arguments (package-arguments nghttp2)
        ((#:phases phases #~%standard-phases)
         #~(modify-phases #$phases
             (add-after 'unpack 'workaround-broken-python-version-check
               (lambda _
                 (substitute* "configure"
                   ;; The configure script uses a string comparison to
                   ;; determine whether the Python interpreter is recent
                   ;; enough, which fails when comparing 3.8 to 3.10.
                   ;; Convert to tuples for a more reliable check.
                   (("print \\(ver >= '3\\.8'\\)")
                    "print (tuple(map(int, ver.split('.'))) >= (3,8))")))))))))))

(define-public nghttp3
  (package
    (name "nghttp3")
    (version "1.4.0")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://github.com/ngtcp2/nghttp3/"
                           "releases/download/v" version "/"
                           "nghttp3-" version ".tar.gz"))
       (sha256
        (base32
         "13s0jhqbs86a91702j8ybh4h5l75k3mi8cwdiikd9b03n5rq19s3"))))
    (build-system gnu-build-system)
    (native-inputs
     (list pkg-config))
    (arguments
     (list
      #:configure-flags
      #~(list "--enable-lib-only")))
    (home-page "https://nghttp2.org/nghttp3/")
    (synopsis "HTTP/3 protocol library")
    (description
     "nghttp3 is an implementation of RFC 9114 HTTP/3 mapping over QUIC and
RFC 9204 QPACK in C.  It does not depend on any particular QUIC transport
implementation.

It implements extensions specified in RFC 9218 and RFC 9220.  It supports
SETTINGS_H3_DATAGRAM from RFC 9297.

It does not support server push.")
    (license license:expat)))

(define-public hpcguix-web
  (package
    (name "hpcguix-web")
    (version "0.4.1")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/UMCUGenetics/hpcguix-web")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "13a4cwqdhpr7gc1z4cxs36qa50mzcdwwlj9qqzv818sx9d7r6vsw"))))
    (build-system gnu-build-system)
    (arguments
     `(#:modules ((guix build gnu-build-system)
                  (guix build utils)
                  (srfi srfi-26)
                  (ice-9 popen)
                  (ice-9 rdelim))
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'set-variables
           (lambda _
             ;; This prevents a few warnings
             (setenv "GUILE_AUTO_COMPILE" "0")
             (setenv "XDG_CACHE_HOME" (getcwd))))
         (add-after 'install 'wrap-program
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let* ((out      (assoc-ref outputs "out"))
                    (guix     (assoc-ref inputs "guix"))
                    (guile    (assoc-ref inputs "guile"))
                    (gcrypt   (assoc-ref inputs "guile-gcrypt"))
                    (git      (assoc-ref inputs "guile-git"))
                    (gnutls   (assoc-ref inputs "guile-gnutls"))
                    (bs       (assoc-ref inputs "guile-bytestructures"))
                    (json     (assoc-ref inputs "guile-json"))
                    (zlib     (assoc-ref inputs "guile-zlib"))
                    (syntax   (assoc-ref inputs "guile-syntax-highlight"))
                    (guile-cm (assoc-ref inputs
                                         "guile-commonmark"))
                    (deps (list guile gcrypt git gnutls bs zlib guile-cm
                                syntax guix json))
                    (effective
                     (read-line
                      (open-pipe* OPEN_READ
                                  (string-append guile "/bin/guile")
                                  "-c" "(display (effective-version))")))
                    (path   (string-join
                             (map (cut string-append <>
                                       "/share/guile/site/"
                                       effective)
                                  deps)
                             ":"))
                    (gopath (string-join
                             (map (cut string-append <>
                                       "/lib/guile/" effective
                                       "/site-ccache")
                                  deps)
                             ":")))
               (wrap-program (string-append out "/bin/hpcguix-web")
                 `("GUILE_LOAD_PATH" ":" prefix (,path))
                 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath)))))))))
    (native-inputs
     (list autoconf automake uglify-js pkg-config
           (lookup-package-native-input guix "guile")))
    (inputs
     (list (lookup-package-native-input guix "guile")
           guix
           guile-zlib
           guile-commonmark
           guile-json-4
           guile-syntax-highlight
           guile-gnutls    ;used to connect to https://disarchive.guix.gnu.org
           bash-minimal))
    (home-page "https://github.com/UMCUGenetics/hpcguix-web")
    (synopsis "Web interface for cluster deployments of Guix")
    (description "Hpcguix-web provides a web interface to the list of packages
provided by Guix.  The list of packages is searchable and provides
instructions on how to use Guix in a shared HPC environment.")
    (license license:agpl3+)))

(define-public httrack
  (package
    (name "httrack")
    (version "3.49.4")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/xroche/httrack")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32
         "1izn1h7gaxb2barclm2pj5kaz1mmddx2c35n70m0552q8ms4lvks"))))
    (build-system gnu-build-system)
    (arguments
     (list
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'autogen
            ;; Force reconfiguration to generate "test-driver".
            (lambda _
              (substitute* "configure.ac"
                ;; Fix errors when running "configure" script.
                (("AX_CHECK_(COMPILE|LINK)_FLAG\\(.*") "")
                (("AX_CHECK_ALIGNED_ACCESS_REQUIRED") "")
                (("gl_VISIBILITY") ""))
              (invoke "autoreconf" "-vif")))
          (add-after 'unpack 'copy-coucal-source
            ;; Install Coucal source to work around missing submodule.
            (lambda* (#:key inputs #:allow-other-keys)
              (for-each (lambda (f) (install-file f "src/coucal"))
                        (find-files #$(this-package-input "coucal")
                                    "\\.(c|h|diff|orig)$")))))))
    (native-inputs
     (list autoconf automake libtool))
    (inputs
     (list coucal libressl zlib))
    (home-page "https://www.httrack.com/")
    (synopsis "Easy-to-use offline browser utility")
    (description "HTTrack allows you to download a World Wide Web site from
the Internet to a local directory, building recursively all directories,
getting HTML, images, and other files from the server to your computer.

HTTrack arranges the original site's relative link-structure.  Simply open
a page of the @emph{mirrored} website in your browser, and you can browse the
site from link to link, as if you were viewing it online.  HTTrack can also
update an existing mirrored site, and resume interrupted downloads.

HTTrack is fully configurable, and has an integrated help system.")
    (license license:gpl3+)))

(define-public binaryen
  (package
    (name "binaryen")
    (version "112")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/WebAssembly/binaryen")
             (commit (string-append "version_" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0970iz22yjxgi27d67kwmrx4zq7hig3i6b92vmlp4c4bd1bacny5"))))
    (build-system cmake-build-system)
    (arguments
     (list
      #:phases
      '(modify-phases %standard-phases
         (add-after 'unpack 'use-system-googletest
           (lambda _
             (substitute* "third_party/CMakeLists.txt"
               (("  googletest/.*") "")
               (("add_library\\(gtest.*") ""))
             (substitute* "CMakeLists.txt"
               (("add_subdirectory\\(test/gtest\\)")
                "find_package(GTest REQUIRED)")))))))
    (native-inputs (list googletest))
    (home-page "https://github.com/WebAssembly/binaryen")
    (synopsis "Optimizer and compiler/toolchain library for WebAssembly")
    (description "Binaryen is a compiler and toolchain infrastructure library
for WebAssembly, written in C++.  It aims to make compiling to WebAssembly
easy, fast, and effective.")
    (license license:asl2.0)))

(define-public buku
  (package
    (name "buku")
    (version "4.6")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "buku" version))
       (sha256
        (base32 "1n4d1mkjyvzdxbyq067p1p9skb3iwx0msd86nzr224dlqrfh9675"))))
    (build-system python-build-system)
    (arguments
     `(#:tests? #f                     ; FIXME: many tests need network access
       #:phases
       (modify-phases %standard-phases
         ;; XXX: missing inputs, e.g. python-flask-admin
         (delete 'sanity-check))))
    (inputs
     (list python-beautifulsoup4 python-certifi python-cryptography
           python-flask python-html5lib python-urllib3))
    (home-page "https://github.com/jarun/buku")
    (synopsis "Bookmark manager")
    (description
     "buku is a powerful bookmark manager written in Python3 and SQLite3.
@command{buku} can auto-import bookmarks from your browser and present them
in an interactive command-line interface that lets you compose and update
bookmarks directly.  It can also present them in a web interface with
@command{bukuserver}.")
    (license license:gpl3+)))

(define-public buku-run
  (package
    (name "buku-run")
    (version "0.1.1")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/carnager/buku_run")
                    (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1zyjjf3b8g3dnymcrg683rbnc6qrvx8ravfm833n7kjrqky3bczn"))))
    (build-system gnu-build-system)
    (arguments
     (list #:tests? #f                  ;no tests
           #:make-flags
           #~(list (string-append "DESTDIR=" #$output)
                   "PREFIX=")
           #:phases
           #~(modify-phases %standard-phases
               (delete 'configure)
               (add-after 'unpack 'fixpath
                 (lambda* (#:key inputs #:allow-other-keys)
                   (substitute* "buku_run"
                     ((" \\<(rofi)\\>" all cmd)
                      (string-append " " (search-input-file inputs "/bin/rofi")))
                     (("\\<(buku)\\> " all cmd)
                      (string-append (search-input-file inputs "/bin/buku") " "))
                     (("\\<(awk|gawk)\\>" cmd)
                      (search-input-file inputs "/bin/awk"))
                     (("/etc/buku_run.config" path)
                      (string-append #$output path))))))))
    (inputs (list buku rofi))
    (home-page "https://github.com/carnager/buku_run")
    (synopsis "rofi frontend for buku bookmarks manager")
    (description
     "This package provides a rofi frontend for the buku bookmark manager.")
    (license license:gpl3+)))

(define-public tissue
  (package
    (name "tissue")
    (version "0.1.0")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://tissue.systemreboot.net/releases/tissue-"
                                  version ".tar.lz"))
              (sha256
               (base32
                "0vsybgnzv8nnwf58pnxrs4101xczl8jvxd1wzmk4vmdyrp8a2kkm"))))
    (build-system gnu-build-system)
    (arguments
     (list #:make-flags #~(list (string-append "prefix=" #$output))
           #:modules `(((guix build guile-build-system)
                        #:select (target-guile-effective-version))
                       (guix build gnu-build-system)
                       (guix build utils))
           #:phases
           (with-imported-modules '((guix build guile-build-system))
             #~(modify-phases %standard-phases
                 (replace 'patch-source-shebangs
                   (lambda* (#:key inputs #:allow-other-keys)
                     (substitute* "bin/tissue"
                       (("^exec guile")
                        (string-append "exec "
                                       (search-input-file inputs "/bin/guile"))))))
                 (delete 'configure)
                 (add-after 'install 'wrap
                   (lambda* (#:key inputs outputs #:allow-other-keys)
                     (let ((out (assoc-ref outputs "out"))
                           (effective-version (target-guile-effective-version)))
                       (wrap-program (string-append out "/bin/tissue")
                         `("GUILE_LOAD_PATH" prefix
                           (,(string-append out "/share/guile/site/" effective-version)
                            ,(getenv "GUILE_LOAD_PATH")))
                         `("GUILE_LOAD_COMPILED_PATH" prefix
                           (,(string-append out "/lib/guile/"
                                            effective-version "/site-ccache")
                            ,(getenv "GUILE_LOAD_COMPILED_PATH")))))))))))
    (inputs (list bash-minimal guile-3.0 guile-filesystem guile-git guile-xapian))
    (native-inputs (list lzip))
    (propagated-inputs (list skribilo))
    (home-page "https://tissue.systemreboot.net")
    (synopsis "Text based project information management system")
    (description "tissue is an issue tracker and project information
management system built on plain text files and git.  It is specifically
intended for small free software projects.  It features a static site
generator to build a project website and a powerful search interface to search
through project issues and documentation.  The search interface is built on
the Xapian search engine library, and is available both as a command-line
program and as a web server.")
    (license license:gpl3+)))

(define-public anonip
  (package
    (name "anonip")
    (version "1.1.0")
    ;; The version on PyPi does not include fixture definitions for tests.
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/DigitaleGesellschaft/Anonip")
                    (commit "beab328945547b0147a53655f32c5cc76ab4488b")))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0cssdcridadjzichz1vv1ng7jwphqkn8ihh83hpz9mcjmxyb94qc"))))
    (build-system python-build-system)
    (arguments
     '(#:phases
       (modify-phases %standard-phases
         (replace 'check
           (lambda* (#:key tests? #:allow-other-keys)
             (when tests?
               (invoke "pytest" "-vv" "tests.py" "anonip.py")))))))
    (native-inputs
     (list python-pytest python-pytest-cov))
    (home-page "https://github.com/DigitaleGesellschaft/Anonip")
    (synopsis "Anonymize IP addresses in log files")
    (description
     "Anonip masks the last bits of IPv4 and IPv6 addresses in log files.
That way most of the relevant information is preserved, while the IP address
does not match a particular individuum anymore.

Depending on your Web server, the log entries may be piped to Anonip directly
or via a FIFO (named pipe).  Thus the unmasked IP addresses will never be
written to any file.

It's also possible to rewrite existing log files.

Anonip can also be uses as a Python module in your own Python application.")
    (license license:bsd-3)))

(define-public poussetaches
  (package
    (name "poussetaches")
    (version "0.0.2")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/tsileo/poussetaches")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32
         "0kckcwvqklavd855np9aq5js6mg84isrlwchr504yigwma0sm7hm"))))
    (build-system go-build-system)
    (propagated-inputs
     (list go-github-com-robfig-cron go-golang-org-x-time))
    (arguments
     `(#:import-path "github.com/tsileo/poussetaches"))
    (home-page "https://github.com/tsileo/poussetaches")
    (synopsis "Lightweight asynchronous task execution service")
    (description "Poussetaches (which literally means \"push tasks\" in
French) is a lightweight asynchronous task execution service that aims to
replace Celery and RabbitMQ for small Python applications.

The app posts base64-encoded payload to poussetaches and specifies the
endpoint that will be used to trigger the task.  Poussetaches makes HTTP
requests with the registered payload until the right status code is
returned.")
    (license license:isc)))

(define-public htmlcxx
  (package
    (name "htmlcxx")
    (version "0.87")
    (source
     (origin
       (method url-fetch)
       (uri
        (string-append "mirror://sourceforge/htmlcxx/v"
                       version "/htmlcxx-" version ".tar.gz"))
       (sha256
        (base32 "1j3mzjlczjrk4ahc43s6kzpvzypzjmqz4sillnca5yadrwwgjf2x"))))
    (build-system gnu-build-system)
    (arguments
     ;; ISO C++17 does not allow dynamic exception specifications
     `(#:configure-flags '("CXXFLAGS=-std=c++11")))
    (home-page "https://htmlcxx.sourceforge.net/")
    (synopsis "Simple non-validating CSS1 and HTML parser for C++")
    (description "htmlcxx is a simple non-validating CSS1 and HTML parser for
C++.  Although there are several other HTML parsers available, htmlcxx has some
characteristics that make it unique:
@itemize
@item STL like navigation of DOM tree, using excelent's tree.hh library from
Kasper Peeters
@item It is possible to reproduce exactly, character by character, the original
document from the parse tree
@item Bundled CSS parser
@item Optional parsing of attributes
@item C++ code that looks like C++ (not so true anymore)
@item Offsets of tags/elements in the original document are stored in the nodes
of the DOM tree
@end itemize")
    (license (list license:lgpl2.0
                   license:gpl2
                   license:asl2.0))))

(define-public librocket
  (package
    (name "librocket")
    (version "1.3.0.0")
    (source
     (origin
       (method git-fetch)
       (uri
        (git-reference
         (url "https://github.com/libRocket/libRocket")
         (commit (string-append "release-" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1n6gq007vqijyfasfnfg6c8d2rc9qarl4bhzbgkz062m4h5izlfs"))))
    (build-system cmake-build-system)
    (arguments
     `(#:tests? #f                      ; No tests.
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'chdir
           (lambda _
             (chdir "Build"))))))
    (inputs
     (list freetype))
    (home-page "https://github.com/libRocket/libRocket") ; http://librocket.com/ is down.
    (synopsis "HTML/CSS user interface library")
    (description "libRocket is a C++ user interface package based on the HTML
and CSS standards.  libRocket uses the open standards XHTML1.0 and
CSS2.0 (while borrowing features from HTML5 and CSS3), and extends them with
features suited towards real-time applications.  It is designed as a complete
solution for any project's interface needs:

@itemize
@item Dynamic layout system.
@item Efficient application-wide styling, with a custom-built templating engine.
@item Fully featured control set: buttons, sliders, drop-downs, etc.
@item Runtime visual debugging suite.
@item Easily integrated and extensible with Python or Lua scripting.
@end itemize\n")
    (license license:expat)))

(define-public gmid
  (package
    (name "gmid")
    (version "2.0.1")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "https://github.com/omar-polo/gmid/releases/download/"
                    version "/gmid-" version ".tar.gz"))
              (sha256
               (base32
                "1riihzgshfk6907r4g69lrlvabiznwi5d7njk7y6km0695lf62g0"))))
    (build-system gnu-build-system)
    (arguments
     (list #:test-target "regress"
           #:phases
           #~(modify-phases %standard-phases
               (replace 'configure
                 (lambda _
                   (setenv "CC" #$(cc-for-target))
                   (invoke "./configure"
                           (string-append "PREFIX=" #$output)))))))
    (native-inputs (list bison
                         coreutils
                         flex
                         pkg-config
                         procps))
    (inputs (list libevent libressl))
    (home-page "https://gmid.omarpolo.com/")
    (synopsis "Simple and secure Gemini server")
    (description "@command{gmid} is a fast Gemini server written with security
in mind.  It has features such as:
@itemize
@item reload the running configuration without interruption
@item automatic redirect/error pages
@item IRI support (RFC3987)
@item reverse proxying
@item CGI and FastCGI support
@item virtual hosts
@item location rules
@item event-based asynchronous I/O model
@item low memory footprint.
@end itemize")
    (license license:isc)))

(define-public kiln
  (package
    (name "kiln")
    (version "0.4.1")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://git.sr.ht/~adnano/kiln")
                    (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1ynb079jsyv6viwdksavwar5lqj84ssfw39dl5da98z683xrvch5"))))
    (build-system go-build-system)
    (arguments
     (list
      #:import-path "git.sr.ht/~adnano/kiln"
      #:install-source? #f
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'install 'install-man
            (lambda _
              (let ((man1 (string-append #$output "/share/man/man1")))
                (system (string-append
                         "scdoc"
                         "< src/git.sr.ht/~adnano/kiln/docs/kiln.1.scd"
                         "> kiln.1"))
                (install-file "kiln.1" man1)))))))
    (native-inputs
     (list scdoc))
    (propagated-inputs
     (list go-github-com-google-shlex
           go-github-com-pelletier-go-toml
           go-gopkg-in-yaml-v3))
    (home-page "https://kiln.adnano.co/")
    (synopsis "Simple static site generator")
    (description
     "Kiln takes a different approach to building static sites.
Instead of packing all functionality into kiln itself, the core is lightweight
and can be extended with the use of external commands.")
    (license license:expat)))

(define-public siege
  (package
    (name "siege")
    (version "4.1.1")
    (source (origin
              (method url-fetch)
              (uri (string-append "http://download.joedog.org/siege/siege-"
                                  version ".tar.gz"))
              (sha256
               (base32
                "1a74py0ib1gr3znv9ah5acw67ngl08b14dbc90ww9clvgdr2ag0l"))))
    (build-system gnu-build-system)
    (arguments
     '(#:configure-flags (list (string-append "--with-zlib="
                                              (assoc-ref %build-inputs "zlib"))
                               (string-append "--with-ssl="
                                              (assoc-ref %build-inputs
                                                         "openssl")))))
    (inputs (list openssl zlib))
    (home-page "https://www.joedog.org/siege-home/")
    (synopsis "HTTP/FTP load tester and benchmarking utility")
    (description
     "Siege is a multi-threaded HTTP/FTP load tester and benchmarking utility.  It
can stress test a single URL with a user defined number of simulated users, or
it can read many URLs into memory and stress them simultaneously.  The program
reports the total number of hits recorded, bytes transferred, response time,
concurrency, and return status.")
    ;; GPLv3+ with OpenSSL linking exception.
    (license license:gpl3+)))

(define-public gmnisrv
  (package
    (name "gmnisrv")
    (version "1.0")
    (home-page "https://git.sr.ht/~sircmpwn/gmnisrv")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url home-page)
             (commit version)))
       (sha256
        (base32 "115r1dw9k08r2nvygy8ll21qvsc5kmzi5jcqm7g7r8q8hifxglap"))
       (file-name (git-file-name name version))))
    (build-system gnu-build-system)
    (arguments
     `(#:tests? #f                      ;no check target
       #:configure-flags (list "--sysconfdir=/etc"
                               (string-append "--with-mimedb="
                                              (assoc-ref %build-inputs "mailcap")
                                              "/etc/mime.types"))
       #:make-flags (list (string-append "CC=" ,(cc-for-target)))))
    (inputs
     (list mailcap openssl))
    (native-inputs
     (list pkg-config scdoc))
    (synopsis "Simple Gemini protocol server")
    (description "gmnisrv is a simple Gemini protocol server written in C.")
    (license (list license:gpl3+
                   license:bsd-3)))) ;; for ini.c and ini.h

(define-public vger
  (package
    (name "vger")
    (version "2.0.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://tildegit.org/solene/vger")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1jiwzn5dqadwq4ih3vzld66yq23gqsf7281sllh29bf6kmf9dz2k"))))
    (build-system gnu-build-system)
    (arguments
     (list #:test-target "test"
           #:make-flags
           #~(list (string-append "CC=" #$(cc-for-target))
                   (string-append "PREFIX=" #$output))
           #:phases
           #~(modify-phases %standard-phases
               (add-after 'unpack 'fix-makefile
                 (lambda _
                   (substitute* "Makefile"
                     (("\\binstall -o root -g wheel vger ")
                      "install vger ")
                     (("\\binstall -o root -g wheel vger\\.8 ")
                      "install -m 644 vger.8 "))))
               (add-before 'install 'make-install-dirs
                 (lambda _
                   (mkdir-p (string-append #$output "/bin"))
                   (mkdir-p (string-append #$output "/man/man8")))))))
    (inputs
     (list libbsd))
    (home-page "https://tildegit.org/solene/vger")
    (synopsis "Gemini protocol server")
    (description "Vger is a Gemini protocol server that supports chroots,
virtualhosts, CGI, default language choice, redirections and MIME-type
detection.  It delegates TLS support to an external daemon, for example
@command{stunnel} on @command{inetd}.")
    (license license:bsd-2)))

(define-public kineto
  (package
    (name "kineto")
    (version "0.0.0-20211105093215-857f8c97ebc5")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://git.sr.ht/~sircmpwn/kineto")
                    (commit (go-version->git-ref version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1r17c904i76yy5ilvhjczmhnq5g7r4nkjwmsjcfxcqzly0ia7m2k"))))
    (build-system go-build-system)
    (arguments
     '(#:import-path "git.sr.ht/~sircmpwn/kineto/"))
    (propagated-inputs
     (list go-git-sr-ht-sircmpwn-getopt go-git-sr-ht-adnano-go-gemini))
    (home-page "https://git.sr.ht/~sircmpwn/kineto/")
    (synopsis "HTTP proxy for Gemini")
    (description
     "This is an @acronym{HTTP} to
@url{https://gemini.circumlunar.space/,Gemini} proxy designed to provide
service for a single domain, i.e.  to make your Gemini site available over
HTTP.  It can proxy to any domain in order to facilitate linking to the rest
of Geminispace, but it defaults to a specific domain.")
    (license license:gpl3+)))

(define-public libzim
  (package
    (name "libzim")
    (version "8.2.1")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/openzim/libzim")
                    (commit version)))
              (sha256
               (base32
                "1g735aqw0vlxqgyjv02lvq24dr5shydp4y8mqianf8720s5fs73f"))
              (file-name (git-file-name name version))))
    (build-system meson-build-system)
    (arguments
     ;; TODO: Find out why tests fail.
     '(#:tests? #f))
    (inputs
     (list icu4c
           python-wrapper ; for libzim-compile-resources
           xapian
           xz
           (list util-linux "lib")
           (list zstd "lib")))
    (native-inputs
     (list pkg-config googletest))
    (home-page "https://wiki.openzim.org/wiki/Main_Page")
    (synopsis "Reference implementation of the ZIM specification")
    (description "The openZIM project proposes offline storage solutions for
content coming from the Web.  The zimlib is the standard implementation of the
ZIM specification.  It is a library which implements the read and write method
for ZIM files.")
    (license license:gpl2)))

(define-public kiwix-lib
  (package
    (name "kiwix-lib")
    (version "13.0.0")
    (home-page "https://github.com/kiwix/kiwix-lib/")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url home-page)
                    (commit version)))
              (sha256
               (base32
                "0mvlppbj0mqn4ka3cfaaj1pvn062cxbgz01c0nq04x0mzq1xwh5w"))
              (file-name (git-file-name name version))))
    (build-system meson-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'configure 'fix-paths-and-includes
           (lambda* (#:key inputs #:allow-other-keys)
             (substitute* "src/aria2.cpp"
               (("ARIA2_CMD \"aria2c\"")
                (string-append "ARIA2_CMD \""
                               (search-input-file inputs "/bin/aria2c")
                               "\""))))))))
    (inputs
     (list aria2
           curl
           icu4c
           libmicrohttpd
           libzim
           pugixml
           xapian
           zlib
           `(,zstd "lib")))
    (native-inputs
     (list cpp-mustache
           pkg-config
           ;; for kiwix-compile-resources
           python-wrapper))
    (synopsis "Common code base for all Kiwix ports")
    (description "The Kiwix library provides the Kiwix software suite core.
It contains the code shared by all Kiwix ports.")
    (license license:gpl3)))

(define-public kiwix-desktop
  (package
    (name "kiwix-desktop")
    (version "2.3.1")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "https://download.kiwix.org/release/kiwix-desktop/kiwix-desktop-"
                    version
                    ".tar.gz"))
              (sha256
               (base32
                "0hlk05gcb3fmnxhwj6gan51v98rdq3iv2lklwbpmm1bazmz8i7br"))
              (patches (search-patches "kiwix-desktop-newer-libkiwix.patch"))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (replace 'configure
           (lambda* (#:key outputs #:allow-other-keys)
             (invoke "qmake"
                     (string-append "PREFIX="
                                    (assoc-ref outputs "out")))))
         (add-after 'install 'wrap-qt-process-path
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (bin (string-append out "/bin/kiwix-desktop"))
                    (qt-process-path (search-input-file
                                      inputs "/lib/qt5/libexec/QtWebEngineProcess")))
               (wrap-program bin
                 `("QTWEBENGINEPROCESS_PATH" = (,qt-process-path)))))))))
    (inputs
     (list bash-minimal
           curl
           icu4c
           kiwix-lib
           libmicrohttpd
           libzim
           pugixml
           qtbase-5
           qtdeclarative-5
           qtwebchannel-5
           qtwebengine-5
           xapian
           zlib
           `(,zstd "lib")))
    (native-inputs
     (list pkg-config
           qtbase-5))
    (home-page "https://wiki.kiwix.org/wiki/Software")
    (synopsis "Viewer and manager of ZIM files")
    (description "Kiwix Desktop allows you to enjoy a lot of different content
offline (such as Wikipedia), without any access to Internet.")
    (license license:gpl3)))

(define-public kiwix-tools
  (package
    (name "kiwix-tools")
    (version "3.5.0")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://download.kiwix.org/release/"
                                  "kiwix-tools/kiwix-tools-" version ".tar.xz"))
              (sha256
               (base32
                "0q6b7viy1jr212q0glqid2hqxnsd2mxsx5gzcalkc4gb0bzgj32d"))))
    (build-system meson-build-system)
    (inputs
     (list curl
           icu4c
           kiwix-lib
           libmicrohttpd
           libzim
           pugixml
           xapian
           zlib
           `(,zstd "lib")))
    (native-inputs
     (list pkg-config))
    (home-page "https://wiki.kiwix.org/wiki/Software")
    (synopsis "Kiwix command line tools")
    (description "The Kiwix tools are a collection of Kiwix-related command line
tools:
@itemize
@item kiwix-manage: Manage XML based library of ZIM files
@item kiwix-read: Read ZIM file content
@item kiwix-search: Fulltext search in ZIM files
@item kiwix-serve: HTTP daemon serving ZIM files
@end itemize\n")
    (license license:gpl3+)))

(define-public uriparser
  (package
    (name "uriparser")
    (version "0.9.6")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/uriparser/uriparser"
                                  "/releases/download/uriparser-"
                                  version "/uriparser-" version ".tar.xz"))
              (sha256
               (base32
                "0i7nxgy36i8v81r213sbvmpxxq9qb4rhii9qbvl1k32jd1ka1252"))))
    (build-system cmake-build-system)
    (native-inputs (list googletest doxygen graphviz))
    (synopsis "Strictly RFC 3986 compliant URI parsing and handling library")
    (description "uriparser is a strictly RFC 3986 compliant URI parsing and
handling library written in C89 (\"ANSI C\").  uriparser is fast and supports
Unicode.")
    (home-page "https://uriparser.github.io/")
    (license license:bsd-3)))

(define-public quark
  ;; No releases yet
  (let ((revision "0")
        (commit "c6a9055e5a30be570e30da8d216c39662c3a3f99"))
    (package
      (name "quark")
      (version (git-version "0.0.0" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://git.suckless.org/quark/")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "1znvnr30xi5vgd6n3wvgv9pwj992zpzzjk0fmq28ydf1l6kqvkm7"))))
      (build-system gnu-build-system)
      (arguments
       (list #:tests? #f ; no tests
             #:make-flags
             #~(list (string-append "CC=" #$(cc-for-target))
                     (string-append "PREFIX=" (assoc-ref %outputs "out")))
             #:phases
             #~(modify-phases %standard-phases
                 (delete 'configure)))) ; no configure script
      (home-page "https://tools.suckless.org/quark/")
      (synopsis "Small and simple HTTP GET/HEAD-only web server for static
content")
      (description "Quark is an extremely small and simple HTTP GET/HEAD only
web server for static content.  TLS is not natively supported and should be
provided by a TLS reverse proxy (e.g. tlstunnel, hitch or stunnel).")
      (license license:isc)

      ;; XXX: Ignore this CVE to work around a name clash with the unrelated
      ;; "cpe:2.3:a:comelz:quark" package.  The proper fix is for (guix cve)
      ;; to account for "vendor names".
      (properties '((lint-hidden-cve . ("CVE-2019-15520")))))))

(define-public go-webring
  (let ((commit "6786a27b0c57df75323217453369c83a4d9f4dea")
        (revision "0"))
    (package
      (name "go-webring")
      (version (git-version "20220426" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://git.sr.ht/~amolith/go-webring")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "1xra0mapdmda8n0z6zsgcqppdzvxc47p0fahsdyig5qmpk89ar8l"))))
      (build-system go-build-system)
      (arguments
       (list #:import-path "git.sr.ht/~amolith/go-webring"
             #:install-source? #f))
      (inputs (list go-github-com-spf13-pflag))
      (home-page "https://git.sr.ht/~amolith/go-webring")
      (synopsis "Simple webring implementation")
      (description
"@code{go--webring} provides a simple webring implementation as used by
the Fediring.")
      (license (list license:cc0 license:bsd-2)))))

(define-public archivebox
  (package
    (name "archivebox")
    (version "0.6.2")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri name version))
              (sha256
               (base32
                "1mnq82ynq01l7vx957bbx4bvgwdh59qsnx6pdydaqszbakp74yyc"))))
    (build-system python-build-system)
    (propagated-inputs
     (list curl
           node))
    (inputs
     (list python
           youtube-dl
           wget
           git
           python-w3lib
           python-ipython
           python-croniter
           python-crontab
           python-dateparser
           python-django-extensions
           python-django-3.1.14
           python-mypy-extensions))
    (native-inputs
     (list python-wheel))
    (synopsis "Self-hosted Web archiving")
    (description "ArchiveBox is a powerful, self-hosted Web archiving
solution to collect, save, and view sites you want to preserve offline.
You can feed it URLs one at a time, or schedule regular imports.  It saves
snapshots of the URLs you feed it in several formats.")
    (home-page "https://archivebox.io/")
    (license license:expat)))

(define-public awslogs
  (package
    (name "awslogs")
    (version "0.14.0")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "awslogs" version))
              (sha256
               (base32
                "0zpp72ixxz18mf1kay7l07sbmf80mik30zw6p4wsxpraza3ry90v"))))
    ;; XXX: doesn't work with pyproject-build-system
    (build-system python-build-system)
    (arguments
     (list
      #:phases
      '(modify-phases %standard-phases
         (add-after 'unpack 'relax-requirements
           (lambda _
             (substitute* "setup.py"
               (("'jmespath>=0.7.1.*',")
                "'jmespath>=0.7.1',"))))
         (add-after 'unpack 'patch-tests
           (lambda _
             ;; XXX These tests fail for unknown reasons, and we can't easily
             ;; figure out why, because stdout is redirected to a string.
             (substitute* "tests/test_it.py"
               (("test_main_get_with_color")
                "_skip_test_main_get_with_color")
               (("test_main_get_query")
                "_skip_test_main_get_query")))))))
    (propagated-inputs
     (list python-boto3 python-jmespath python-dateutil python-termcolor))
    (home-page "https://github.com/jorgebastida/awslogs")
    (synopsis "Command line tool to read AWS CloudWatch logs")
    (description
     "This package provides awslogs, a simple command line tool to download
and read AWS CloudWatch logs.")
    (license license:bsd-3)))

(define-public orcania
  (package
    (name "orcania")
    (version "2.3.2")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/babelouest/orcania")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0dhczbhwvf3f9mj38qm46j10rpr77yz1np68mabfw8zcfwhr0pn4"))))
    (build-system cmake-build-system)
    (arguments
     (list #:configure-flags #~(list "-DBUILD_ORCANIA_TESTING=ON"
                                     "-DBUILD_ORCANIA_DOCUMENTATION=ON")
           #:phases #~(modify-phases %standard-phases
                        (add-after 'build 'build-doc
                          (lambda _
                            (invoke "make" "doc")))
                        (add-after 'install 'install-doc
                          (lambda _
                            (let ((doc (string-append #$output
                                                      "/share/doc/orcania")))
                              (mkdir-p doc)
                              (copy-recursively "../source/doc/html" doc)))))))
    (native-inputs (list check doxygen subunit))
    (home-page "https://babelouest.github.io/orcania/")
    (synopsis "Collection of C functions for Ulfius")
    (description
     "Orcania is a library with functions that can be shared among C programs.
It is intended to provide low-level functionalities for the Ulfius and Yder
libraries.")
    (license license:lgpl2.1)))

(define-public yder
  (package
    (name "yder")
    (version "1.4.19")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/babelouest/yder")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "02jgrqby39ykfdhc7z0bh3x5aqisqybz6lnvn7msh9wqbj5zvzi8"))))
    (build-system cmake-build-system)
    (arguments
     (list #:configure-flags #~(list "-DWITH_JOURNALD=OFF"
                                     "-DBUILD_YDER_TESTING=ON"
                                     "-DBUILD_YDER_DOCUMENTATION=ON")
           #:phases #~(modify-phases %standard-phases
                        (add-after 'build 'build-doc
                          (lambda _
                            (invoke "make" "doc")))
                        (add-after 'install 'install-doc
                          (lambda _
                            (let ((doc (string-append #$output
                                                      "/share/doc/yder")))
                              (mkdir-p doc)
                              (copy-recursively "../source/doc/html" doc)))))))
    (native-inputs (list check doxygen subunit))
    (inputs (list orcania))
    (home-page "https://babelouest.github.io/yder/")
    (synopsis "Logging library for C applications")
    (description
     "Yder is a logging library written in C.  It can log messages to the
console, a file, syslog, journald, or a callback function.")
    (license license:lgpl2.1)))

(define-public ulfius
  (package
    (name "ulfius")
    (version "2.7.13")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/babelouest/ulfius")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1dfwdpqmqki63dddi53bfv6jd0kzv8gh2w1lxsv6mzk3sxl6qakf"))))
    (build-system cmake-build-system)
    (arguments
     (list #:configure-flags #~(list "-DBUILD_ULFIUS_TESTING=ON"
                                     "-DBUILD_ULFIUS_DOCUMENTATION=ON")
           #:phases #~(modify-phases %standard-phases
                        (add-after 'build 'build-doc
                          (lambda _
                            (invoke "make" "doc")))
                        (replace 'check
                          (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
                            (when tests?
                              (let ((job-count (number->string
                                                (or (and parallel-tests?
                                                         (parallel-job-count))
                                                    1))))
                                ;; Skip failing tests that try to start a server.
                                (invoke "ctest" "--output-on-failure"
                                        "-j" job-count "-E"
                                        "(core|framework|example_callbacks)")))))
                        (add-after 'install 'install-doc
                          (lambda _
                            (let ((doc (string-append #$output
                                                      "/share/doc/ulfius")))
                              (mkdir-p doc)
                              (copy-recursively "../source/doc/html" doc)))))))
    (native-inputs (list check doxygen subunit))
    (inputs (list zlib))
    (propagated-inputs ;for libulfius.pc
     (list curl
           gnutls
           jansson
           libgcrypt
           libmicrohttpd
           orcania
           yder))
    (home-page "https://babelouest.github.io/ulfius/")
    (synopsis "HTTP Framework for REST Applications in C")
    (description
     "Ulfius is a HTTP Framework library for REST Applications written in C.
It is based on GNU libmicrohttpd for the backend web server, Jansson for the
JSON manipulation library, and libcurl for the http/smtp client API.  It can
be used to facilitate creation of web applications in C programs with a small
memory footprint, as in embedded systems applications.  It can create
webservices in HTTP or HTTPS mode, stream data, or implement server
websockets.")
    (license license:lgpl2.1)))

;;;
;;; Avoid adding new packages to the end of this file. To reduce the chances
;;; of a merge conflict, place them above by existing packages with similar
;;; functionality or similar names.
;;;

debug log:

solving dd1b9438a2 ...
found dd1b9438a2 in https://yhetil.org/guix-patches/a7516560dfa5bb4af794d4ce6e9c53a6a2e10019.1724369334.git.arunisaac@systemreboot.net/
found 34922911a7 in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 34922911a71072f56f2e1b724484f4a4a5bc770e	gnu/packages/web.scm

applying [1/1] https://yhetil.org/guix-patches/a7516560dfa5bb4af794d4ce6e9c53a6a2e10019.1724369334.git.arunisaac@systemreboot.net/
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 34922911a7..dd1b9438a2 100644

Checking patch gnu/packages/web.scm...
Applied patch gnu/packages/web.scm cleanly.

index at:
100644 dd1b9438a2487114387940b63a1273b9a92f0817	gnu/packages/web.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).