{ungoogled-,}chromium,chromedriver: 130.0.6723.58 -> 130.0.6723.69 (#351519)
[NixPkgs.git] / pkgs / development / lisp-modules / packages.nix
blobea93ef4a4572e6329932823a225366be2606976d
1 { build-asdf-system, spec, quicklispPackagesFor, stdenv, pkgs, ... }:
3 let
5   inherit (pkgs.lib)
6     head
7     makeLibraryPath
8     makeSearchPath
9     setAttr
10     hasAttr
11     optionals
12     isDerivation
13     hasSuffix
14     splitString
15     remove
16   ;
18   # Used by builds that would otherwise attempt to write into storeDir.
19   #
20   # Will run build two times, keeping all files created during the
21   # first run, exept the FASL's. Then using that directory tree as the
22   # source of the second run.
23   #
24   # E.g. cl-unicode creating .txt files during compilation
25   build-with-compile-into-pwd = args:
26     let
27       args' = if isDerivation args then args.drvAttrs else args;
28       build = (build-asdf-system (args' // { version = args'.version + "-build"; }))
29         .overrideAttrs(o: {
30           buildPhase = with builtins; ''
31             runHook preBuild
33             mkdir __fasls
34             export ASDF_OUTPUT_TRANSLATIONS="$(pwd):$(pwd)/__fasls:${storeDir}:${storeDir}"
35             export CL_SOURCE_REGISTRY=$CL_SOURCE_REGISTRY:$(pwd)//
36             ${o.pkg}/bin/${o.program} ${toString (o.flags or [])} < ${o.buildScript}
38             runHook postBuild
39           '';
40           installPhase = ''
41             runHook preInstall
43             mkdir -pv $out
44             rm -rf __fasls
45             cp -r * $out
47             runHook postInstall
48           '';
49         });
50     in build-asdf-system (args' // {
51       # Patches are already applied in `build`
52       patches = [];
53       postPatch = "";
54       src = build;
55     });
57   # Makes it so packages imported from Quicklisp can be re-used as
58   # lispLibs ofpackages in this file.
59   ql = quicklispPackagesFor spec;
61   packages = ql.overrideScope (self: super: {
63   cl-unicode = build-with-compile-into-pwd {
64     inherit (super.cl-unicode) pname version src systems;
65     lispLibs = super.cl-unicode.lispLibs ++ [ self.flexi-streams ];
66   };
68   jzon = super.com_dot_inuoe_dot_jzon;
70   cl-notify = build-asdf-system {
71     pname = "cl-notify";
72     version = "20080904-138ca7038";
73     src = pkgs.fetchzip {
74       url = "https://repo.or.cz/cl-notify.git/snapshot/138ca703861f4a1fbccbed557f92cf4d213668a1.tar.gz";
75       sha256 = "0k6ns6fzvjcbpsqgx85r4g5m25fvrdw9481i9vyabwym9q8bbqwx";
76     };
77     lispLibs = [
78       self.cffi
79     ];
80     nativeLibs = [
81       pkgs.libnotify
82     ];
83   };
85   cl-liballegro-nuklear = build-with-compile-into-pwd super.cl-liballegro-nuklear;
87   lessp = build-asdf-system {
88     pname = "lessp";
89     version = "0.2-f8a9e4664";
90     src = pkgs.fetchzip {
91       url = "https://github.com/facts-db/cl-lessp/archive/632217602b85b679e8d420654a0aa39e798ca3b5.tar.gz";
92       sha256 = "0i3ia14dzqwjpygd0zn785ff5vqnnmkn75psfpyx0ni3jr71lkq9";
93     };
94   };
96   rollback = build-asdf-system {
97     pname = "rollback";
98     version = "0.1-5d3f21fda";
99     src = pkgs.fetchzip {
100       url = "https://github.com/facts-db/cl-rollback/archive/5d3f21fda8f04f35c5e9d20ee3b87db767915d15.tar.gz";
101       sha256 = "12dpxsbm2al633y87i8p784k2dn4bbskz6sl40v9f5ljjmjqjzxf";
102     };
103   };
105   facts = build-asdf-system {
106     pname = "facts";
107     version = "0.1-632217602";
108     src = pkgs.fetchzip {
109       url = "https://beta.quicklisp.org/archive/cl-facts/2022-11-06/cl-facts-20221106-git.tgz";
110       sha256 = "sha256-PBpyyJYkq1NjKK9VikSAL4TmrGRwUJlEWRSeKj/f4Sc=";
111     };
112     lispLibs = [ self.lessp self.rollback self.local-time ];
113   };
115   cl-fuse = build-with-compile-into-pwd {
116     inherit (super.cl-fuse) pname version src lispLibs;
117     nativeBuildInputs = [ pkgs.fuse ];
118     nativeLibs = [ pkgs.fuse ];
119   };
121   cl-containers = build-asdf-system {
122     inherit (super.cl-containers) pname version src;
123     lispLibs = super.cl-containers.lispLibs ++ [ self.moptilities ];
124     systems = [ "cl-containers" "cl-containers/with-moptilities" ];
125   };
127   swank = build-with-compile-into-pwd rec {
128     inherit (super.swank) pname lispLibs;
129     version = "2.29.1";
130     src = pkgs.fetchFromGitHub {
131       owner = "slime";
132       repo = "slime";
133       rev =  "v${version}";
134       hash = "sha256-5hNB5XxbTER4HX3dn4umUGnw6UeiTQkczmggFz4uWoE=";
135     };
136     systems = [ "swank" "swank/exts" ];
137     patches = [ ./patches/swank-pure-paths.patch ];
138     postConfigure = ''
139       substituteAllInPlace swank-loader.lisp
140     '';
141   };
143   slynk = build-asdf-system {
144     pname = "slynk";
145     version = "trunk";
146     src = pkgs.fetchFromGitHub {
147       owner = "joaotavora";
148       repo = "sly";
149       rev =  "ba40c8f054ec3b7040a6c36a1ef3e9596b936421";
150       hash = "sha256-hoaCZtyezuXptDPnAvBTT0SZ14M9Ifrmki3beBOwFmI=";
151     };
152     systems = [
153       "slynk" "slynk/arglists" "slynk/fancy-inspector"
154       "slynk/package-fu" "slynk/mrepl" "slynk/trace-dialog"
155       "slynk/profiler" "slynk/stickers" "slynk/indentation"
156       "slynk/retro"
157     ];
158   };
160   cephes = build-with-compile-into-pwd {
161     inherit (super.cephes) pname version src lispLibs;
162     patches = [ ./patches/cephes-make.patch ];
163     postPatch = ''
164       find \( -name '*.dll' -o -name '*.dylib' -o -name '*.so' \) -delete
165     '';
166     postConfigure = ''
167       substituteAllInPlace cephes.asd
168     '';
169     postInstall = ''
170       find $out -name '*.o' -delete
171     '';
172   };
174   clx-truetype = build-asdf-system {
175     pname = "clx-truetype";
176     version = "20160825-git";
177     src = pkgs.fetchzip {
178       url = "http://beta.quicklisp.org/archive/clx-truetype/2016-08-25/clx-truetype-20160825-git.tgz";
179       sha256 = "079hyp92cjkdfn6bhkxsrwnibiqbz4y4af6nl31lzw6nm91j5j37";
180     };
181     lispLibs = with self; [
182       alexandria bordeaux-threads cl-aa cl-fad cl-paths cl-paths-ttf
183       cl-store cl-vectors clx trivial-features zpb-ttf
184     ];
185   };
187   mathkit = build-asdf-system {
188     inherit (super.mathkit) pname version src asds ;
189     lispLibs = super.mathkit.lispLibs ++ [ super.sb-cga ];
190   };
192   stumpwm = super.stumpwm.overrideLispAttrs (o: rec {
193     version = "22.11";
194     src = pkgs.fetchFromGitHub {
195       owner = "stumpwm";
196       repo = "stumpwm";
197       rev = version;
198       hash = "sha256-zXj17ucgyFhv7P0qEr4cYSVRPGrL1KEIofXWN2trr/M=";
199     };
200     buildScript = pkgs.writeText "build-stumpwm.lisp" ''
201       (load "${super.stumpwm.asdfFasl}/asdf.${super.stumpwm.faslExt}")
203       (asdf:load-system 'stumpwm)
205       ;; Prevents package conflict error
206       (when (uiop:version<= "3.1.5" (asdf:asdf-version))
207         (uiop:symbol-call '#:asdf '#:register-immutable-system :stumpwm)
208         (dolist (system-name (uiop:symbol-call '#:asdf
209                                                '#:system-depends-on
210                                                (asdf:find-system :stumpwm)))
211           (uiop:symbol-call '#:asdf '#:register-immutable-system system-name)))
213       ;; Prevents "cannot create /homeless-shelter" error
214       (asdf:disable-output-translations)
216       (sb-ext:save-lisp-and-die
217         "stumpwm"
218         :executable t
219         :purify t
220         #+sb-core-compression :compression
221         #+sb-core-compression t
222         :toplevel #'stumpwm:stumpwm)
223     '';
224     installPhase = ''
225       mkdir -p $out/bin
226       cp -v stumpwm $out/bin
227     '';
228   });
230   stumpwm-unwrapped = super.stumpwm;
232   clfswm = super.clfswm.overrideAttrs (o: rec {
233     buildScript = pkgs.writeText "build-clfswm.lisp" ''
234       (load "${o.asdfFasl}/asdf.${o.faslExt}")
235       (asdf:load-system 'clfswm)
236       (sb-ext:save-lisp-and-die
237         "clfswm"
238         :executable t
239         #+sb-core-compression :compression
240         #+sb-core-compression t
241         :toplevel #'clfswm:main)
242     '';
243     installPhase = o.installPhase + ''
244       mkdir -p $out/bin
245       mv $out/clfswm $out/bin
246     '';
247   });
249   magicl = build-with-compile-into-pwd {
250     inherit (super.magicl) pname version src lispLibs;
251     nativeBuildInputs = [ pkgs.gfortran ];
252     nativeLibs = [ pkgs.openblas ];
253   };
255   cl-glib_dot_gio = throw "cl-glib_dot_gio was replaced by cl-gio";
257   cl-gtk4 = build-asdf-system {
258     pname = "cl-gtk4";
259     version = "1.0.0";
260     src = pkgs.fetchFromGitHub {
261       owner = "bohonghuang";
262       repo = "cl-gtk4";
263       rev = "ff60e3495cdbba5c09d0bb8aa49f3184cc060c8e";
264       hash = "sha256-06cyPf+5z+GE3YvZEJ67kC281nkwRz/hoaykTISsni0=";
265     };
266     lispLibs = with self; [
267       cl-gobject-introspection-wrapper
268       cl-glib
269       cl-gio
270       cl-gobject
271     ];
272     nativeBuildInputs = [
273       pkgs.gobject-introspection
274       pkgs.gtk4
275     ];
276     nativeLibs = [
277       pkgs.gtk4
278     ];
279   };
281   cl-gtk4_dot_adw = build-asdf-system {
282     pname = "cl-gtk4.adw";
283     version = self.cl-gtk4.version;
284     src = self.cl-gtk4.src;
285     lispLibs = with self; [
286       cl-gobject-introspection-wrapper
287       cl-gtk4
288     ];
289     nativeBuildInputs = [
290       pkgs.libadwaita
291     ];
292     nativeLibs = [
293       pkgs.libadwaita
294     ];
295   };
297   cl-gtk4_dot_webkit2 = throw "cl-gtk4_dot_webkit2 was replaced by cl-gtk4_dot_webkit";
299   cl-gtk4_dot_webkit = build-asdf-system {
300     pname = "cl-gtk4.webkit";
301     version = self.cl-gtk4.version;
302     src = self.cl-gtk4.src;
303     lispLibs = with self; [
304       cl-gobject-introspection-wrapper
305       cl-gtk4
306     ];
307     nativeBuildInputs = [
308       pkgs.webkitgtk_6_0
309     ];
310     nativeLibs = [
311       pkgs.webkitgtk_6_0
312     ];
313   };
315   cl-avro = build-asdf-system {
316     pname = "cl-avro";
317     version = "trunk";
318     src = pkgs.fetchFromGitHub {
319       owner = "SahilKang";
320       repo = "cl-avro";
321       rev = "b8fa26320fa0ae88390215140d57f9cca937f691";
322       hash = "sha256-acXsotvKWuffrLbrG9YJ8yZc5E6WC8N0qCFCAiX6N0Q=";
323     };
324     lispLibs = with self; [
325       alexandria babel chipz closer-mop ieee-floats flexi-streams local-time
326       local-time-duration md5 salza2 st-json time-interval
327       trivial-extensible-sequences
328     ];
329   };
331   frugal-uuid = super.frugal-uuid.overrideLispAttrs (o: {
332     systems = [
333       "frugal-uuid"
334       "frugal-uuid/non-frugal"
335       "frugal-uuid/benchmark"
336       "frugal-uuid/test"
337     ];
338     lispLibs = o.lispLibs ++ (with self; [
339       ironclad
340       babel
341       trivial-clock
342       trivial-benchmark
343       fiveam
344     ]);
345   });
347   duckdb = super.duckdb.overrideLispAttrs (o: {
348     systems = [ "duckdb" "duckdb/test" "duckdb/benchmark" ];
349   });
351   polyclot = build-asdf-system {
352     pname = "polyclot";
353     version = "trunk";
354     src = pkgs.fetchfossil {
355       url = "https://fossil.turtleware.eu/fossil.turtleware.eu/polyclot";
356       rev = "18500c968b1fc1e2a915b5c70b8cddc4a2b54de51da4eedc5454e42bfea3b479";
357       sha256 = "sha256-KgBL1QQN4iG6d8E9GlKAuxSwkrY6Zy7e1ZzEDGKad+A=";
358     };
359     systems = [ "eu.turtleware.polyclot" "eu.turtleware.polyclot/demo" ];
360     lispLibs = with self; [ clim mcclim mcclim-layouts ];
361   };
363   kons-9 = build-asdf-system rec {
364     pname = "kons-9";
365     version = "trunk";
366     src = pkgs.fetchFromGitHub {
367       owner = "kaveh808";
368       repo = "kons-9";
369       rev = "08770e7fbb839b91fd035f1cd4a50ecc81b42d57";
370       sha256 = "sha256-Tit/qmOU5+zp43/ecIXGbh4CtgWzltWM7tHdVWkga0k=";
371     };
372     systems = [ "kons-9" "kons-9/testsuite" ];
373     patches = [ ./patches/kons-9-fix-testsuite-compilation.patch ];
374     lispLibs = with self; [
375       closer-mop trivial-main-thread trivial-backtrace cffi cl-opengl cl-glu
376       cl-glfw3 cl-paths-ttf zpb-ttf cl-vectors origin clobber shasht
377       org_dot_melusina_dot_confidence
378     ];
379   };
381   nsb-cga = super.nsb-cga.overrideLispAttrs (oa: {
382     lispLibs = oa.lispLibs ++ [ self.sb-cga ];
383   });
385   qlot-cli = build-asdf-system rec {
386     pname = "qlot";
387     version = "1.5.2";
389     src = pkgs.fetchFromGitHub {
390       owner = "fukamachi";
391       repo = "qlot";
392       rev = "refs/tags/${version}";
393       hash = "sha256-j9iT25Yz9Z6llCKwwiHlVNKLqwuKvY194LrAzXuljsE=";
394     };
396     lispLibs = with self; [
397       archive
398       deflate
399       dexador
400       fuzzy-match
401       ironclad
402       lparallel
403       yason
404     ];
406     nativeLibs = [
407       pkgs.openssl
408     ];
410     nativeBuildInputs = [
411       pkgs.makeWrapper
412     ];
414     buildScript = pkgs.writeText "build-qlot-cli" ''
415       (load "${self.qlot-cli.asdfFasl}/asdf.${self.qlot-cli.faslExt}")
416       (asdf:load-system :qlot/command)
417       (asdf:load-system :qlot/subcommands)
419       ;; Use uiop:dump-image instead of sb-ext:dump-image for the image restore hooks
420       (setf uiop:*image-entry-point* #'qlot/cli:main)
421       (uiop:dump-image "qlot"
422                        :executable t
423                        #+sb-core-compression :compression
424                        #+sb-core-compression t)
425     '';
427     installPhase = ''
428       runHook preInstall
430       mkdir -p $out/bin
431       cp qlot.asd $out
432       rm *.asd
433       cp -r * $out
435       mv $out/qlot $out/bin
436       wrapProgram $out/bin/qlot \
437         --prefix LD_LIBRARY_PATH : $LD_LIBRARY_PATH
439       runHook postInstall
440     '';
442     meta.mainProgram = "qlot";
443   };
445   fset = super.fset.overrideLispAttrs (oa: {
446     systems = [ "fset" "fset/test" ];
447     meta = {
448       description = "functional collections library";
449       homepage = "https://gitlab.common-lisp.net/fset/fset/-/wikis/home";
450       license = pkgs.lib.licenses.llgpl21;
451     };
452   });
454   thih-coalton = self.coalton;
455   quil-coalton = self.coalton;
456   coalton = super.coalton.overrideLispAttrs (oa: {
457     systems = [
458       "coalton"
459       "thih-coalton"
460       "quil-coalton"
461       "thih-coalton/tests"
462       "quil-coalton/tests"
463       "coalton/tests"
464     ];
465     lispLibs = oa.lispLibs ++ [ self.fiasco ];
466     nativeLibs = [ pkgs.mpfr ];
467     meta = {
468       description = "statically typed functional programming language that supercharges Common Lisp";
469       homepage = "https://coalton-lang.github.io";
470       license = pkgs.lib.licenses.mit;
471     };
472   });
474   });
476 in packages