-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
lisp-packages-lite.nix
2706 lines (2414 loc) · 75.8 KB
/
lisp-packages-lite.nix
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
# Copyright © 2022–2024 Hraban Luyat
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, version 3 of the License.
#
# This program 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
{
inputs
, pkgs
}:
with {
inherit (pkgs) lib;
};
rec {
lispPackagesLite = lispPackagesLiteFor pkgs.sbcl; # The King ❤️
# The lisp is a function which takes a file and returns a shell invocation
# calling that file, then exiting. Or just a derivation of a known Lisp,
# e.g. lisp = pkgs.sbcl.
lispPackagesLiteFor = lisp': lib.recurseIntoAttrs (lib.makeScope pkgs.newScope (self:
with self;
with callPackage ./utils.nix {};
with {
lisp = makeLisp lisp';
};
with callPackage ./lisp-derivation.nix { inherit lisp; };
let
lispify = name: lispDependencies:
lispDerivation {
inherit lispDependencies;
lispSystem = name; # convention
src = inputs.${name};
};
in {
inherit lispDerivation lispMultiDerivation lispWithSystems lispScript;
"1am" = lispify "1am" [];
inherit (lispMultiDerivation {
src = inputs."3bmd";
systems = {
"3bmd" = {
lispDependencies = [ alexandria esrap split-sequence ];
lispCheckDependencies = [ self."3bmd-ext-code-blocks" fiasco ];
};
"3bmd-ext-code-blocks" = {
lispDependencies = [ self."3bmd" alexandria colorize split-sequence ];
};
"3bmd-ext-tables" = {
lispDependencies = [
self."3bmd"
];
};
};
}) "3bmd"
"3bmd-ext-code-blocks"
"3bmd-ext-tables";
"3d-math" = lispDerivation {
lispDependencies = [ documentation-utils type-templates ];
lispCheckDependencies = [ parachute ];
src = inputs."3d-math";
# For ABCL, if that would fix it: _JAVA_OPTIONS="-Xmx4g";
env = lib.optionalAttrs (lisp.name == "sbcl") {
NIX_SBCL_DYNAMIC_SPACE_SIZE = "4gb";
};
lispSystem = "3d-math";
# Compiling this on CLISP hangs forever.
# On ECL:
# * The declaration (DECLARE (FTYPE (FUNCTION ((OR IVEC4 DVEC4 VEC4 IVEC3 DVEC3 VEC3 IVEC2 DVEC2 VEC2)) (VALUES (OR I32 F64 F32) &OPTIONAL)) VX)) was found in a bad place.
meta.broken = b.elem lisp.name [ "clisp" "ecl" "abcl" ];
};
"3d-vectors" = lispDerivation {
lispDependencies = [ documentation-utils ];
lispCheckDependencies = [ parachute ];
src = inputs."3d-vectors";
lispSystem = "3d-vectors";
};
inherit (lispMultiDerivation {
src = inputs."40ants-doc";
systems = {
"40ants-doc" = {
lispDependencies = [
cl-ppcre
commondoc-markdown
named-readtables
pythonic-string-reader
slynk
str
swank
];
lispCheckDependencies = [
rove
self."40ants-doc-full"
];
};
"40ants-doc-full" = {
lispDependencies = [
self."40ants-doc"
cl-fad
commondoc-markdown
dexador
docs-builder
fare-utils
jonathan
lass
pythonic-string-reader
slynk
spinneret
stem
str
swank
tmpdir
trivial-extract
xml-emitter
];
};
};
}) "40ants-doc" "40ants-doc-full";
"40ants-asdf-system" = lispDerivation {
lispSystem = "40ants-asdf-system";
src = inputs."40ants-asdf-system";
# Depends on a modern ASDF. SBCL’s built-in ASDF crashes this. Explicitly
# listing self. here to avoid grabbing nixpkgs.asdf.
lispDependencies = [ self.asdf ];
lispCheckDependencies = [ rove ];
};
access = lispDerivation {
lispSystem = "access";
src = inputs.access;
lispDependencies = [ alexandria closer-mop iterate cl-ppcre ];
lispCheckDependencies = [ lisp-unit2 ];
};
acclimation = lispify "acclimation" [];
alexandria = lispDerivation {
lispSystem = "alexandria";
src = inputs.alexandria;
# Contrary to what its .asd file suggests, Alexandria now requires rt even
# on SBCL. This is recent (introduced after v1.4).
lispCheckDependencies = [ rt ];
};
alien-ring = lispify "alien-ring" [ cffi trivial-gray-streams ];
anaphora = lispDerivation {
lispSystem = "anaphora";
lispCheckDependencies = [ rt ];
src = inputs.anaphora;
};
anypool = lispDerivation {
src = inputs.anypool;
lispSystem = "anypool";
lispDependencies = [ bordeaux-threads cl-speedy-queue ];
lispCheckDependencies = [ rove ];
};
archive = lispify "archive" [ trivial-gray-streams cl-fad ];
inherit (lispMultiDerivation {
src = inputs.arnesi;
systems = {
arnesi = {
lispDependencies = [ collectors ];
lispCheckDependencies = [ fiveam ];
};
arnesi-cl-ppcre-extras = {
lispSystem = "arnesi/cl-ppcre-extras";
lispDependencies = [ arnesi cl-ppcre ];
};
arnesi-slime-extras = {
lispSystem = "arnesi/slime-extras";
lispDependencies = [ arnesi swank ];
};
};
# #<PACKAGE CHARSET> has no external symbol with name "UTF-16"
meta.broken = lisp.name == "clisp";
}) arnesi arnesi-cl-ppcre-extras arnesi-slime-extras;
array-utils = lispDerivation {
lispSystem = "array-utils";
lispCheckDependencies = [ parachute ];
src = inputs.array-utils;
};
arrow-macros = lispDerivation {
lispSystem = "arrow-macros";
src = inputs.arrow-macros;
lispDependencies = [ alexandria ];
lispCheckDependencies = [ fiveam ];
};
asdf = lispDerivation {
# Sometimes a dependent project will try and build asdf/defsystems. I’m
# not exactly clear on when this happens but it’s fixed by just always
# precompiling it here.
lispSystems = [ "asdf" "asdf/defsystem" ];
src = inputs.asdf;
};
asdf-flv = lispDerivation {
lispSystem = "net.didierverna.asdf-flv";
src = inputs.asdf-flv;
};
asdf-system-connections = lispify "asdf-system-connections" [];
assoc-utils = lispDerivation {
lispSystem = "assoc-utils";
src = inputs.assoc-utils;
lispCheckDependencies = [ rove ];
};
atomics = lispDerivation {
lispSystem = "atomics";
src = inputs.atomics;
lispDependencies = [ documentation-utils ];
lispCheckDependencies = [ parachute ];
# CLISP is not supported by the Atomics library.
# The CAS operation is not supported by Armed Bear Common Lisp in Atomics.
# This is most likely due to lack of support by the implementation.
# If you think this is in error, and the implementation does expose
# the necessary operators, please file an issue at
# https://github.com/shinmera/atomics/issues
meta.broken = b.elem lisp.name [ "abcl" "clisp" ];
};
inherit (lispMultiDerivation {
src = inputs.babel;
systems = {
babel = {
lispDependencies = [ alexandria trivial-features ];
lispCheckDependencies = [ hu_dwim_stefil ];
};
babel-streams = {
lispDependencies = [ alexandria babel trivial-gray-streams ];
lispCheckDependencies = [ hu_dwim_stefil ];
};
};
}) babel babel-streams;
blackbird = lispDerivation {
lispSystem = "blackbird";
src = inputs.blackbird;
lispDependencies = [ vom ];
lispCheckDependencies = [ cl-async fiveam ];
};
bordeaux-threads = lispDerivation rec {
lispDependencies = [
alexandria
global-vars
trivial-features
trivial-garbage
];
lispCheckDependencies = [ fiveam ];
buildInputs = [ pkgs.libuv ];
lispSystem = "bordeaux-threads";
src = inputs.bordeaux-threads;
meta.broken = lisp.name == "clisp" || (lisp.name == "sbcl" && !lisp.deriv.threadSupport);
};
inherit (lispMultiDerivation rec {
src = inputs.cffi;
patches = ./patches/clffi-libffi-no-darwin-carevout.patch;
systems = {
cffi = {
lispDependencies = [ alexandria babel trivial-features ];
lispCheckDependencies = [ cffi-grovel bordeaux-threads rt ];
# I don’t know if cffi-libffi is external but it doesn’t seem to be
# so just leave it for now.
};
cffi-grovel = {
# cffi-grovel depends on cffi-toolchain. Just specifying it as an
# exported system works because cffi-toolchain is specified in this
# same source derivation.
lispSystems = [ "cffi-grovel" "cffi-toolchain" ];
lispDependencies = [ alexandria cffi trivial-features ];
lispCheckDependencies = [ bordeaux-threads rt ];
};
};
# lisp-modules-new doesn’t specify GCC and somehow it works fine. Is
# there an accidental transitive dependency, there? Is that because GCC is
# included through mkDerivation, and its setupHook is automatically
# triggered? Or how is this solved? Additionally, this only seems to be
# used by a pretty incidental make call, because the only rule that uses
# GCC just happens to be at the top, making it the default make
# target. Not sure if this is the ideal way to “build” this package.
# Note: Technically this will always be required because cffi-grovel
# depends on cffi bare, but it’s a good litmus test for the system.
nativeBuildInputs = with pkgs; [
pkg-config
gcc
];
propagatedBuildInputs = with pkgs; l.optionals stdenv.isDarwin [
# On Darwin, osicat needed access to the libtool package. I have a
# feeling that’s because of CFFI, and CFFI should provide it, but
# honestly I don’t know if this is the right place. Maybe I should just
# make osicat define this as a nativeBuildInput?
xcbuild
];
buildInputs = systems: l.optionals (b.elem "cffi" systems) [ pkgs.libffi ];
# This is broken on Darwin because libcffi rewrites the import path in a
# way that’s incompatible with pkgconfig. It should be "if darwin AND (not
# pkg-config)".
setupHooks = systems: l.optionals (b.elem "cffi" systems) [(
if pkgs.hostPlatform.isDarwin
# LD_.. only works with CFFI on Mac, but not with
# sb-alien:load-shared-object. DYLD_.. works with both.
then builtins.toFile "cffi-setup-hook-darwin.sh" (builtins.replaceStrings
[ "LD_LIBRARY_PATH" ]
[ "DYLD_LIBRARY_PATH" ]
(builtins.readFile ./cffi-setup-hook.sh ))
else ./cffi-setup-hook.sh
)];
meta = systems: a.optionalAttrs (b.elem "cffi" systems) {
# CFFI requires CLISP compiled with dynamic FFI support, which only
# enabled on Linux. And it’s supposed to work with ABCL but I don’t know
# how, so I’m marking this broken for now.
broken = ! (lisp.name == "clisp" -> pkgs.stdenv.isLinux) ||
lisp.name == "abcl";
};
}) cffi cffi-grovel;
calispel = lispDerivation {
lispSystem = "calispel";
src = inputs.calispel;
lispDependencies = [ jpl-queues bordeaux-threads ];
lispCheckDependencies = [ eager-future2 ];
};
chipz = lispify "chipz" [ ];
chunga = lispify "chunga" [ trivial-gray-streams ];
inherit (lispMultiDerivation {
src = inputs.coalton;
systems = {
coalton = {
lispDependencies = [
alexandria
concrete-syntax-tree
eclector
eclector-concrete-syntax-tree
float-features
fset
named-readtables
split-sequence
trivia
trivial-garbage
];
lispCheckDependencies = [
fiasco
coalton-examples
];
};
coalton-examples = {
lispSystems = [
"coalton-json"
"quil-coalton"
"small-coalton-programs"
"thih-coalton"
];
lispDependencies = [ coalton json-streams ];
lispCheckDependencies = [ fiasco ];
};
coalton-benchmarks = {
lispSystem = "coalton/benchmarks";
lispDependencies = [
coalton
trivial-benchmark
yason
];
};
coalton-doc = {
lispSystem = "coalton/doc";
lispDependencies = [
coalton
html-entities
yason
];
};
};
# Technically coalton is always a dependency so any derivation will always
# include coalton so this could just hard-code the list, but I like to be
# explicit about it for the sake of clarity.
propagatedBuildInputs = systems: l.optionals (b.elem "coalton" systems) [
# Actual dependencies
pkgs.mpfr
pkgs.libuv
# For the dynamic loading setup hook, even though we don’t even use
# CFFI. Needs better UX.
cffi
];
preBuild = let
testDirectories = [
"$PWD/examples/coalton-json"
"$PWD/examples/quil-coalton"
"$PWD/examples/small-coalton-programs"
"$PWD/examples/thih"
];
testPaths = b.concatStringsSep ":" testDirectories;
in ''
export CL_SOURCE_REGISTRY="${testPaths}:$CL_SOURCE_REGISTRY"
'';
meta = {
# Broken since the last update and I can’t exactly figure out why.
broken = true;
};
}) coalton coalton-benchmarks coalton-doc coalton-examples;
circular-streams = lispDerivation {
lispSystem = "circular-streams";
src = inputs.circular-streams;
lispDependencies = [ fast-io trivial-gray-streams ];
lispCheckDependencies = [ cl-test-more flexi-streams ];
};
cl-annot = lispDerivation {
lispSystem = "cl-annot";
src = inputs.cl-annot;
lispDependencies = [ alexandria ];
lispCheckDependencies = [ cl-test-more ];
};
cl-ansi-text = lispDerivation {
lispSystem = "cl-ansi-text";
src = inputs.cl-ansi-text;
lispDependencies = [ alexandria cl-colors2 ];
lispCheckDependencies = [ fiveam ];
};
inherit (lispMultiDerivation rec {
name = "cl-async";
src = inputs.cl-async;
systems = {
cl-async = {
# ECL wants an archive file (.a) for every dependent /system/ (not
# just source derivation) when it creates a binary for an
# application. Since cl-async has this cl-async-base system
# internally, if it doesn’t exist ECL will create a cl-async-base.a
# file at build time of a dependent system, which obviously leads to a
# nix store read-only violation. What I hate about this: it’s a
# violation of the entire cl-nix-lite premise of “you don’t have to
# declare internal systems, just external ones”, only for the sake of
# ECL. Am I going to have to do this for every package now? I’m not
# looking forward to it. On the other hand: who cares? As always, I’ll
# just fix it here for now and see where this takes me further down
# the road. - hraban 2023-10
lispSystems = [ "cl-async" "cl-async-base" "cl-async-util" ];
lispDependencies = [
babel
bordeaux-threads
cffi
cffi-grovel
cl-libuv
cl-ppcre
fast-io
static-vectors
trivial-features
trivial-gray-streams
vom
];
};
cl-async-repl = {
lispDependencies = [ bordeaux-threads cl-async ];
};
cl-async-ssl = {
lispDependencies = [ cffi cl-async vom ];
};
};
propagatedBuildInputs = systems: l.optionals (builtins.elem "cl-async-ssl" systems) [
pkgs.openssl
];
}) cl-async cl-async-repl cl-async-ssl;
cl-base64 = lispDerivation rec {
lispSystem = "cl-base64";
version = "577683b18fd880b82274d99fc96a18a710e3987a";
src = inputs.cl-base64;
lispCheckDependencies = [ ptester kmrcl ];
};
cl-change-case = lispDerivation {
lispSystem = "cl-change-case";
src = inputs.cl-change-case;
lispDependencies = [
cl-ppcre
cl-ppcre-unicode
];
lispCheckDependencies = [ fiveam ];
};
cl-colors = lispDerivation {
lispSystem = "cl-colors";
lispCheckDependencies = [ lift ];
lispDependencies = [ alexandria let-plus ];
src = inputs.cl-colors;
};
cl-colors2 = lispDerivation {
lispSystem = "cl-colors2";
src = inputs.cl-colors2;
lispDependencies = [ alexandria cl-ppcre parse-number ];
lispCheckDependencies = [ clunit2 ];
};
inherit (lispMultiDerivation {
src = inputs.cl-containers;
systems = {
cl-containers = {
lispDependencies = [ metatilities-base ];
lispCheckDependencies = [ lift ];
};
# This is an infectious dependency which, if available on the search
# path at all, will cause cl-containers to start compiling some extra of
# its files. This must of course happen at build time of cl-containers,
# otherwise it happens in the nix store which will fail. So if if you
# are a dependent of cl-containers and you, or any of your dependencies,
# depend on asdf-system-connections, you must include this version of
# cl-containers lest you get a build error.
"cl-containers/with-asdf-system-connections" = {
lispSystems = [
"cl-containers/with-moptilities"
"cl-containers/with-utilities"
"cl-containers/with-variates"
];
lispDependencies = [
cl-containers
asdf-system-connections
moptilities
metatilities-base
cl-variates
];
};
};
}) cl-containers "cl-containers/with-asdf-system-connections";
cl-cookie = lispDerivation {
lispSystem = "cl-cookie";
src = inputs.cl-cookie;
lispDependencies = [ alexandria cl-ppcre proc-parse local-time quri ];
lispCheckDependencies = [ rove ];
};
cl-coveralls = lispDerivation {
lispSystem = "cl-coveralls";
lispCheckDependencies = [ prove ];
lispDependencies = [
alexandria
cl-ppcre
dexador
flexi-streams
ironclad
jonathan
lquery
split-sequence
];
src = inputs.cl-coveralls;
};
cl-custom-hash-table = lispDerivation {
src = inputs.cl-custom-hash-table;
lispSystem = "cl-custom-hash-table";
lispCheckDependencies = [ hu_dwim_stefil ];
};
cl-difflib = lispify "cl-difflib" [ ];
cl-dot = lispDerivation {
lispSystem = "cl-dot";
src = inputs.cl-dot;
propagatedBuildInputs = [ pkgs.graphviz ];
# https://github.com/michaelw/cl-dot/issues/42
meta.broken = lisp.name == "clisp";
};
cl-fad = lispDerivation {
lispSystem = "cl-fad";
src = inputs.cl-fad;
lispDependencies = [ alexandria bordeaux-threads ];
lispCheckDependencies = [ cl-ppcre unit-test ];
# The assertion (PATH:= (PATH:CATDIR #P"/a/" #P"/b/" #P"c/" #P"d/" #P"e" #P"f/") #P"/b/c/./d/f/") failed.
meta.broken = lisp.name == "abcl";
};
cl-gopher = lispify "cl-gopher" [
usocket
flexi-streams
drakma
bordeaux-threads
quri
];
cl-html-diff = lispify "cl-html-diff" [ cl-difflib ];
cl-interpol = lispDerivation {
lispSystem = "cl-interpol";
src = inputs.cl-interpol;
lispDependencies = [ cl-unicode named-readtables ];
lispCheckDependencies = [ flexi-streams ];
};
cl-isaac = lispDerivation {
lispSystem = "cl-isaac";
src = inputs.cl-isaac;
lispCheckDependencies = [ parachute trivial-features ];
};
cl-js = lispDerivation {
lispSystem = "cl-js";
src = inputs.js;
lispDependencies = [ parse-js cl-ppcre ];
};
cl-json = lispDerivation {
lispSystem = "cl-json";
lispCheckDependencies = [ fiveam ];
src = inputs.cl-json;
};
cl-libuv = lispDerivation rec {
lispDependencies = [ alexandria cffi cffi-grovel ];
propagatedBuildInputs = [ pkgs.libuv ];
lispSystem = "cl-libuv";
src = inputs.cl-libuv;
};
inherit (lispMultiDerivation {
src = inputs.cl-libxml2;
systems = {
cl-libxml2 = {
lispSystems = [ "cl-libxml2" "xfactory" "xoverlay" ];
lispDependencies = [
iterate
cffi
puri
flexi-streams
alexandria
garbage-pools
metabang-bind
];
lispCheckDependencies = [ lift ];
};
# Defined as a separate Nix derivation because it has complicated and
# fragile build steps, and as far as I can tell QL doesn’t even export
# this at all. Consider this derivation experimental for now. It’d be nice
# if it actually worked, of course.
cl-libxslt = {
lispDependencies = [ cl-libxml2 ];
};
};
makeFlags = [
"CC=cc"
];
buildInputs = systems:
(l.optional (b.elem "cl-libxml2" systems) pkgs.libxml2) ++
(l.optional (b.elem "cl-libxslt" systems) pkgs.libxslt);
outputs = systems:
[ "out" ] ++
l.optional (b.elem "cl-libxslt" systems) "lib";
# This :force t isn’t necessary, and it breaks tests
postUnpack = ''
(cd "$sourceRoot"; sed -i -e "s/ :force t//" *.asd)
'';
preBuild = systems:
s.optionalString (b.elem "cl-libxslt" systems) (
let
libname = "cllibxml2${pkgs.stdenv.hostPlatform.extensions.sharedLibrary}";
in ''
LIBNAME=${libname} make -C foreign
mkdir -p $lib
cp -r foreign/${libname} $lib/
# No need to special case this for Darwin (DYLD_..) because
# we're using cffi which picks up LD_ on both Linux and
# Darwin.
addToSearchPath "LD_LIBRARY_PATH" "$lib"
''
);
}) cl-libxml2 cl-libxslt;
cl-locale = lispDerivation {
src = inputs.cl-locale;
lispDependencies = [ anaphora arnesi cl-annot cl-syntax cl-syntax-annot ];
lispCheckDependencies = [ flexi-streams prove ];
lispSystem = "cl-locale";
};
cl-markdown = lispDerivation {
lispSystem = "cl-markdown";
src = inputs.cl-markdown;
lispDependencies = [
asdf-system-connections
anaphora
self."cl-containers/with-asdf-system-connections"
cl-ppcre
dynamic-classes
metabang-bind
metatilities-base
];
lispCheckDependencies = [ lift trivial-shell ];
# “There is no class named ABSTRACT-CONTAINER.”
meta.broken = lisp.name == "abcl";
};
cl-mimeparse = lispDerivation {
lispDependencies = [ cl-ppcre parse-number ];
lispCheckDependencies = [ rt ];
src = inputs.cl-mimeparse;
lispSystem = "cl-mimeparse";
};
cl-mock = lispDerivation {
src = inputs.cl-mock;
lispSystem = "cl-mock";
lispDependencies = [
alexandria
bordeaux-threads
closer-mop
trivia
];
lispCheckDependencies = [
fiveam
];
};
"cl+ssl" = lispDerivation {
lispSystem = "cl+ssl";
src = inputs."cl+ssl";
lispDependencies = [
alexandria
bordeaux-threads
cffi
flexi-streams
trivial-features
trivial-garbage
trivial-gray-streams
usocket
];
lispCheckDependencies = [
bordeaux-threads
cl-coveralls
fiveam
trivial-sockets
usocket
];
propagatedBuildInputs = [ pkgs.openssl ];
};
inherit (lispMultiDerivation rec {
src = inputs.cl-ppcre;
systems = {
cl-ppcre = {
lispCheckDependencies = [ flexi-streams ];
};
cl-ppcre-unicode = {
lispDependencies = [ cl-ppcre cl-unicode ];
lispCheckDependencies = [ flexi-streams ];
};
};
}) cl-ppcre cl-ppcre-unicode;
cl-prevalence = lispDerivation {
lispSystem = "cl-prevalence";
src = inputs.cl-prevalence;
lispDependencies = [
moptilities
s-xml
s-sysdeps
];
lispCheckDependencies = [ fiveam find-port ];
};
cl-qrencode = lispDerivation {
lispSystem = "cl-qrencode";
src = inputs.cl-qrencode;
lispDependencies = [ zpng ];
lispCheckDependencies = [ lisp-unit ];
};
cl-quickcheck = lispify "cl-quickcheck" [ ];
cl-reactive = lispDerivation {
src = inputs.cl-reactive;
lispSystem = "cl-reactive";
lispDependencies = [
bordeaux-threads
closer-mop
trivial-garbage
anaphora
];
lispCheckDependencies = [
nst
];
meta.broken = builtins.elem lisp.name [
# Attempt to define a subclass of built-in-class FUNCTION.
"abcl"
# Class #<The BUILT-IN-CLASS FUNCTION> is not a valid superclass for #<The CLOS:FUNCALLABLE-STANDARD-CLASS CL-REACTIVE::SIGNAL-FUNCTION>
"ecl"
];
};
cl-redis = lispDerivation {
lispSystem = "cl-redis";
lispDependencies = [
babel
cl-ppcre
flexi-streams
rutils
usocket
];
lispCheckDependencies = [ bordeaux-threads should-test ];
src = inputs.cl-redis;
};
cl-slice = lispDerivation {
lispSystem = "cl-slice";
src = inputs.cl-slice;
lispDependencies = [ alexandria anaphora let-plus ];
lispCheckDependencies = [ clunit ];
};
cl-sqlite = lispDerivation {
src = inputs.cl-sqlite;
lispDependencies = [ iterate cffi ];
lispCheckDependencies = [ fiveam bordeaux-threads ];
propagatedBuildInputs = [ pkgs.sqlite ];
lispSystem = "sqlite";
};
cl-speedy-queue = lispify "cl-speedy-queue" [ ];
cl-strings = lispDerivation {
lispSystem = "cl-strings";
src = inputs.cl-strings;
lispCheckDependencies = [ prove ];
};
inherit (lispMultiDerivation {
src = inputs.cl-syntax;
systems = {
cl-syntax = {
lispDependencies = [ named-readtables trivial-types ];
};
cl-syntax-annot = {
lispDependencies = [ cl-syntax cl-annot ];
};
cl-syntax-interpol = {
lispDependencies = [ cl-syntax cl-interpol ];
};
};
}) cl-syntax cl-syntax-annot cl-syntax-interpol;
cl-test-more = prove;
cl-tld = lispify "cl-tld" [ ];
cl-tls = lispify "cl-tls" [ ironclad alexandria fast-io cl-base64 ];
cl-unicode = lispDerivation {
lispSystem = "cl-unicode";
src = inputs.cl-unicode;
lispDependencies = [ cl-ppcre flexi-streams ];
};
# The official location for this source is
# "https://www.common-lisp.net/project/cl-utilities/cl-utilities-latest.tar.gz"
# but I’m not a huge fan of including a "latest.tar.gz" in a Nix
# derivation. That being said: it hasn’t been changed since 2006, so maybe
# that is a better resource.
cl-utilities = lispDerivation {
lispSystem = "cl-utilities";
src = inputs.cl-utilities;
};
inherit (lispMultiDerivation {
src = inputs.cl-variates;
systems = {
cl-variates = {
lispCheckDependencies = [ lift ];
};
"cl-variates/with-metacopy" = {
lispDependencies = [
cl-variates
asdf-system-connections
metacopy
];
};
};
meta = systems: a.optionalAttrs (b.elem "cl-variates/with-metacopy" systems) {
broken = b.elem lisp.name [
# The function get-structure is not yet implemented for Armed Bear Common Lisp 1.9.2 on AARCH64.
"abcl"
# *** - The function get-structure is not yet implemented for CLISP 2.49.92
"clisp"
# ;;; The function get-structure is not yet implemented for ECL 21.2.1 on arm64.
"ecl"
];
};
}) cl-variates "cl-variates/with-metacopy";
cl-who = lispDerivation {
lispSystem = "cl-who";
src = inputs.cl-who;
lispCheckDependencies = [ flexi-streams ];
};
inherit (lispMultiDerivation {
src = inputs.clack;
systems = {
# TODO: This is a complex package with lots of derivations and check
# dependencies. Fill in as necessary. I’ve only filled in what I need
# right now.
clack = {
lispDependencies = [
alexandria
bordeaux-threads
lack
swank
usocket
];
};
clack-handler-hunchentoot = {
lispDependencies = [
alexandria
bordeaux-threads
clack-socket
flexi-streams
hunchentoot
split-sequence
];
lispCheckDependencies = [ clack-test ];
};
clack-socket = {};
clack-test = {
lispDependencies = [
bordeaux-threads
clack
clack-handler-hunchentoot
dexador
flexi-streams
http-body
ironclad
rove
usocket
];
};
};
}) clack clack-handler-hunchentoot clack-socket clack-test;
closer-mop = lispify "closer-mop" [ ];
clss = lispify "clss" [ array-utils plump ];
clunit = lispify "clunit" [ ];
clunit2 = lispify "clunit2" [ ];
collectors = lispDerivation {
lispSystem = "collectors";
lispDependencies = [ alexandria closer-mop symbol-munger ];
lispCheckDependencies = [ lisp-unit2 ];
src = inputs.collectors;
};
colorize = lispify "colorize" [ alexandria html-encode split-sequence ];
common-doc = lispDerivation {
src = inputs.common-doc;
# These all use practically the same dependencies. Light-weight enough that
# it’s not worth the hassle to split them up, IMO.
lispSystems = [
"common-doc"