-
-
Notifications
You must be signed in to change notification settings - Fork 412
/
nyxt.asd
514 lines (490 loc) · 18.3 KB
/
nyxt.asd
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
;;;; SPDX-FileCopyrightText: Atlas Engineer LLC
;;;; SPDX-License-Identifier: BSD-3-Clause
#-asdf3.1 (error "Nyxt requires ASDF 3.1.2")
;; WARNING: We _must_ declare the translation host or else ASDF won't recognize
;; the pathnames as logical-pathnames, thus returning the system directory
;; instead.
(setf (logical-pathname-translations "NYXT") nil)
(defsystem "nyxt"
:defsystem-depends-on ("nasdf")
:class :nasdf-system
:version "4"
:author "Atlas Engineer LLC"
:homepage "https://nyxt-browser.com"
:description "Extensible web browser in Common Lisp"
:license "BSD 3-Clause"
:depends-on (alexandria
bordeaux-threads
calispel
cl-base64
cl-colors2
cl-gopher
cl-json
cl-ppcre
cl-ppcre-unicode
cl-prevalence
cl-qrencode
cl-tld
closer-mop
dissect
moptilities
dexador
enchant
flexi-streams
history-tree
iolib
iolib/os
lass
local-time
lparallel
log4cl
ndebug
nclasses
nfiles
njson/cl-json
nhooks
nkeymaps
nsymbols/star
#-sbcl
osicat
parenscript
prompter
py-configparser
quri
serapeum
str
phos
plump
clss
spinneret
slynk
slynk/arglists
slynk/fancy-inspector
slynk/indentation
slynk/mrepl
slynk/package-fu
slynk/stickers
slynk/trace-dialog
sqlite
swank
swank/exts
trivia
trivial-clipboard
trivial-features
trivial-garbage
trivial-package-local-nicknames
trivial-types
unix-opts
usocket
;; Local systems:
nyxt/user-interface
nyxt/text-buffer
nyxt/analysis
nyxt/download-manager
nyxt/password-manager
nyxt/theme)
:pathname #p"NYXT:source;"
:components ((:file "utilities")
(:file "types")
(:file "package" :depends-on ("utilities" "types"))
(:module "Utilities"
:pathname ""
:depends-on ("package")
:components
((:file "time")
(:file "keyscheme")
(:file "conditions")
(:file "debug")
(:file "user-interface")))
(:module "Core"
:pathname ""
:depends-on ("Utilities")
:serial t
:components
((:file "renderer")
(:file "global")
(:file "concurrency")
(:file "user-files")
(:file "user-classes")
(:file "configuration")
(:file "parenscript-macro")
(:file "message")
(:file "command")
(:file "renderer-script")
(:file "urls")
(:file "inspector")
(:file "dom")
(:file "search-engine")
(:file "buffer")
(:file "window")
(:file "mode")
(:file "history")
(:file "auto-rules")
(:file "spinneret-tags")
(:file "browser")
(:file "foreign-interface")
(:file "clipboard")
(:file "color")
(:file "input")
(:file "prompt-buffer")
(:file "command-commands")
(:file "debugger")
(:file "recent-buffers")
(:file "external-editor")))
(:module "Core modes"
:pathname "mode"
:depends-on ("Core")
:components
((:file "input-edit")
(:file "buffer-listing")
(:file "message")
(:file "passthrough")
(:file "history-tree")
(:file "list-history")
(:file "document" :depends-on ("passthrough"))
(:file "hint" :depends-on ("document"))
(:file "search-buffer")
(:file "spell-check" :depends-on ("document"))
(:file "help" :depends-on ("document" "search-buffer"))
(:file "history" :depends-on ("history-tree" "list-history"))
(:file "certificate-exception" :depends-on ("history"))
(:file "keyscheme")
(:file "proxy")
(:file "process")
(:file "user-script")))
(:file "describe" :depends-on ("Core modes"))
(:module "Prompter modes"
:pathname "mode"
:depends-on ("describe" "Core modes")
:components
((:file "prompt-buffer")
(:file "hint-prompt-buffer" :depends-on ("prompt-buffer"))
(:file "file-manager" :depends-on ("prompt-buffer"))
(:file "download" :depends-on ("file-manager"))))
(:file "mode/base" :depends-on ("Core modes"))
(:file "status" :depends-on ("Core"))
(:module "Editor modes"
:pathname "mode"
:depends-on ("Core modes")
:components
((:file "editor")
(:file "plaintext-editor")))
(:module "Help"
:pathname ""
:depends-on ("Core modes" "Modes")
:components
((:file "help")
(:file "about")
(:file "tutorial")
(:file "changelog")
(:file "migration")))
(:file "configuration-commands" :depends-on ("Help"))
(:file "start" :depends-on ("configuration-commands"))
(:file "manual" :depends-on ("configuration-commands"))
(:module "Modes"
:pathname "mode"
:depends-on ("Core modes")
:components
((:file "annotate")
(:file "autofill")
(:file "blocker")
(:file "bookmark")
(:file "bookmark-frequent-visits" :depends-on ("bookmark"))
(:file "bookmarklets")
(:file "cruise-control" :depends-on ("repeat"))
(:file "emacs")
(:file "expedition")
(:file "force-https")
(:file "history-migration")
(:file "macro-edit")
(:file "no-image")
(:file "no-script")
(:file "no-sound")
(:file "no-webgl")
(:file "password")
(:file "reading-line")
(:file "reduce-bandwidth")
(:file "reduce-tracking")
(:file "repeat")
(:file "repl")
(:file "small-web")
(:file "style" :depends-on ("bookmarklets"))
(:file "visual")
(:file "vi")
(:file "watch"))))
:in-order-to ((test-op (test-op "nyxt/tests")
;; Dumping the manual may catch errors.
(compile-op "nyxt/documentation")
;; Subsystems:
(test-op "nyxt/analysis")
(test-op "nyxt/theme"))))
(defsystem "nyxt/tests"
:defsystem-depends-on ("nasdf")
:class :nasdf-test-system
:depends-on (nyxt lisp-unit2)
:pathname #p"NYXT:tests;"
:components ((:file "package")
(:file "offline/define-configuration")
(:file "offline/global-history")
(:file "offline/prompt-buffer")
(:file "offline/urls")
(:file "offline/user-script-parsing")
(:file "offline/mode")
(:module "Modes"
:pathname "offline/mode"
:components
((:file "autofill")
(:file "annotate")
(:file "base")
(:file "blocker")
;; TODO Fix bookmark-frequent-visits-mode architecture
;; (:file "tests/offline/mode/bookmark-frequent-visits")
(:file "bookmark")
(:file "bookmarklets")
(:file "buffer-listing")
(:file "certificate-exception")
(:file "cruise-control")
(:file "document")
(:file "download")
(:file "editor")
(:file "emacs")
(:file "expedition")
(:file "file-manager")
(:file "force-https")
(:file "help")
(:file "hint-prompt-buffer")
(:file "hint")
(:file "history-tree")
(:file "history")
(:file "input-edit")
(:file "keyscheme")
(:file "list-history")
(:file "macro-edit")
(:file "message")
(:file "no-image")
(:file "no-script")
(:file "no-sound")
(:file "no-webgl")
(:file "passthrough")
(:file "password")
(:file "process")
(:file "prompt-buffer")
(:file "proxy")
(:file "reading-line")
(:file "reduce-bandwidth")
(:file "reduce-tracking")
;; TODO Fix repeat-mode architecture. Visit the file below for
;; more information.
;; (:file "repeat")
(:file "repl")
(:file "search-buffer")
(:file "small-web")
(:file "spell-check")
(:file "style")
(:file "vi")
;; TODO Fix visual-mode architecture. Visit the file below for
;; more information.
;; (:file "tests/offline/mode/visual")
(:file "user-script")
(:file "watch"))))
:test-suite-args (:package :nyxt/tests))
(defsystem "nyxt/benchmarks"
:defsystem-depends-on ("nasdf")
:class :nasdf-system
:depends-on (nyxt alexandria trivial-benchmark)
:pathname #p"NYXT:tests;benchmarks;"
:components ((:file "package")
(:file "prompter"))
:perform (test-op (op c)
(eval-input
"(nasdf:print-benchmark
(alexandria:hash-table-alist
(benchmark:run-package-benchmarks :package :nyxt/benchmarks
:verbose t)))")))
(defsystem "nyxt/documentation"
:depends-on (nyxt)
:output-files (compile-op (o c)
(values (list (system-relative-pathname c "manual.html"))
t))
:perform (compile-op (o c)
(let ((man-source (component-pathname (find-component (find-system "nyxt")
"manual")))
(man-dump (output-file o c)))
(if (or (not (file-exists-p man-dump))
(> (symbol-call :nyxt/mode/file-manager :mtime man-source)
(symbol-call :nyxt/mode/file-manager :mtime man-dump)))
(with-open-file (out man-dump :direction :output :if-exists :supersede)
(write-string (symbol-call :nyxt :manual-content) out)
(format *error-output* "Manual dumped to ~s.~&" man-dump))
(format *error-output* "Manual at ~s is up-to-date.~&" man-dump)))))
(defsystem "nyxt/gtk"
:defsystem-depends-on ("nasdf")
:class :nasdf-system
:depends-on (nyxt cl-webkit2)
:pathname #p"NYXT:source;renderer;"
:components ((:file "gtk")))
(defsystem "nyxt/gi-gtk"
:defsystem-depends-on ("nasdf")
:class :nasdf-system
:depends-on (nyxt/gtk cl-gobject-introspection)
:pathname #p"NYXT:source;renderer;"
:components ((:file "gi-gtk"))
:in-order-to ((test-op (test-op "nyxt/gi-gtk/tests")
(test-op "nyxt/tests")
;; Dumping the manual may catch errors.
(compile-op "nyxt/documentation")
;; Subsystems:
(test-op "nyxt/analysis")
(test-op "nyxt/theme"))))
(defsystem "nyxt/gi-gtk/tests"
:defsystem-depends-on ("nasdf")
:class :nasdf-test-system
:depends-on (nyxt/gi-gtk lisp-unit2)
:pathname #p"NYXT:tests;"
:serial t
:components ((:file "renderer-package")
(:file "renderer-offline/set-url")
(:file "renderer-offline/custom-schemes")
(:file "renderer-offline/search-buffer")
;; See https://github.com/atlas-engineer/nyxt/issues/3172
;; (:file "renderer-online/set-url")
)
:test-suite-args (:package :nyxt/tests/renderer))
(defsystem "nyxt/electron"
:depends-on (nyxt cl-electron)
:pathname #p"NYXT:source;renderer;"
:components ((:file "electron")))
;; We should not set the build-pathname in systems that have a component.
;; Indeed, when an external program (like Guix) builds components, it needs to
;; know the name of the output. But ASDF/SYSTEM::COMPONENT-BUILD-PATHNAME is
;; non-exported so the only reliable way to know the build pathname is to use
;; the default.
;;
;; The workaround is to set a new dummy system of which the sole purpose is to
;; produce the desired binary.
(defsystem "nyxt/gtk-application"
:defsystem-depends-on ("nasdf")
:class :nasdf-system
:depends-on (nyxt/gtk)
:build-operation "program-op"
:build-pathname "nyxt"
:entry-point "nyxt:entry-point")
(defsystem "nyxt/gi-gtk-application"
:defsystem-depends-on ("nasdf")
:class :nasdf-system
:depends-on (nyxt/gi-gtk)
:build-operation "program-op"
:build-pathname "nyxt"
:entry-point "nyxt:entry-point")
(defsystem "nyxt/electron-application"
:defsystem-depends-on ("nasdf")
:class :nasdf-system
:depends-on (nyxt/electron)
:build-operation "program-op"
:build-pathname "nyxt-electron"
:entry-point "nyxt:entry-point")
(defsystem "nyxt/install"
:defsystem-depends-on ("nasdf")
:class :nyxt-renderer-system
:components ((:nasdf-desktop-file "assets/nyxt.desktop")
(:nasdf-appdata-file "assets/nyxt.metainfo.xml")
(:nasdf-icon-scalable-file "assets/glyphs/nyxt.svg")
(:nasdf-icon-directory "assets/")
(:nasdf-binary-file "nyxt")
(:nasdf-source-file "nyxt.asd")
(:nasdf-source-directory "source")
(:nasdf-source-directory "nasdf")
(:nasdf-source-directory "libraries"
:exclude-types ("o" "c" "h" ; C code and artifacts.
"fasl"))))
;; Library subsystems:
(defsystem "nyxt/download-manager"
:defsystem-depends-on ("nasdf")
:class :nasdf-system
:depends-on (calispel
cl-ppcre
dexador
log4cl
quri
str)
:pathname #p"NYXT:libraries;download-manager;"
:components ((:file "package")
(:file "engine")
(:file "native")))
(defsystem "nyxt/analysis"
:defsystem-depends-on ("nasdf")
:class :nasdf-system
:depends-on (alexandria
cl-ppcre
serapeum
str)
:pathname #p"NYXT:libraries;analysis;"
:components ((:file "package")
(:file "composite-sequence")
(:file "data")
(:file "stem")
(:file "tokenize")
(:file "analysis")
(:file "document-vector")
(:file "text-rank")
(:file "dbscan")
(:file "section"))
:in-order-to ((test-op (test-op "nyxt/analysis/tests"))))
(defsystem "nyxt/analysis/tests"
:defsystem-depends-on ("nasdf")
:class :nasdf-test-system
:depends-on (nyxt/analysis lisp-unit2)
:pathname #p"NYXT:libraries;analysis;tests;"
:components ((:file "tests"))
:test-suite-args (:package :analysis/tests))
(defsystem "nyxt/user-interface"
:defsystem-depends-on ("nasdf")
:class :nasdf-system
:depends-on (spinneret)
:pathname #p"NYXT:libraries;user-interface;"
:components ((:file "package")
(:file "user-interface")))
(defsystem "nyxt/text-buffer"
:defsystem-depends-on ("nasdf")
:class :nasdf-system
:depends-on (cluffer)
:pathname #p"NYXT:libraries;text-buffer;"
:components ((:file "package")
(:file "text-buffer")))
(defsystem "nyxt/password-manager"
:defsystem-depends-on ("nasdf")
:class :nasdf-system
:depends-on (bordeaux-threads
cl-ppcre
nclasses
serapeum
str
trivial-clipboard
uiop)
:pathname #p"NYXT:libraries;password-manager;"
:components ((:file "package")
(:file "password")
(:file "password-keepassxc")
(:file "password-security")
;; Keep password-pass as to ensure higher priority.
(:file "password-pass")))
(defsystem "nyxt/theme"
:defsystem-depends-on ("nasdf")
:class :nasdf-system
:depends-on (alexandria
cl-colors2
lass
nclasses
serapeum)
:pathname #p"NYXT:libraries;theme;"
:components ((:file "package")
(:file "utilities")
(:file "theme"))
:in-order-to ((test-op (test-op "nyxt/theme/tests"))))
(defsystem "nyxt/theme/tests"
:defsystem-depends-on ("nasdf")
:class :nasdf-test-system
:depends-on (nyxt/theme lisp-unit2)
:pathname #p"NYXT:libraries;theme;tests;"
:components ((:file "tests"))
:test-suite-args (:package :theme/tests))