1 { build-asdf-system, spec, quicklispPackagesFor, stdenv, pkgs, ... }:
18 # Used by builds that would otherwise attempt to write into storeDir.
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.
24 # E.g. cl-unicode creating .txt files during compilation
25 build-with-compile-into-pwd = args:
27 args' = if isDerivation args then args.drvAttrs else args;
28 build = (build-asdf-system (args' // { version = args'.version + "-build"; }))
30 buildPhase = with builtins; ''
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}
50 in build-asdf-system (args' // {
51 # Patches are already applied in `build`
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 ];
68 jzon = super.com_dot_inuoe_dot_jzon;
70 cl-notify = build-asdf-system {
72 version = "20080904-138ca7038";
74 url = "https://repo.or.cz/cl-notify.git/snapshot/138ca703861f4a1fbccbed557f92cf4d213668a1.tar.gz";
75 sha256 = "0k6ns6fzvjcbpsqgx85r4g5m25fvrdw9481i9vyabwym9q8bbqwx";
85 cl-liballegro-nuklear = build-with-compile-into-pwd super.cl-liballegro-nuklear;
87 lessp = build-asdf-system {
89 version = "0.2-f8a9e4664";
91 url = "https://github.com/facts-db/cl-lessp/archive/632217602b85b679e8d420654a0aa39e798ca3b5.tar.gz";
92 sha256 = "0i3ia14dzqwjpygd0zn785ff5vqnnmkn75psfpyx0ni3jr71lkq9";
96 rollback = build-asdf-system {
98 version = "0.1-5d3f21fda";
100 url = "https://github.com/facts-db/cl-rollback/archive/5d3f21fda8f04f35c5e9d20ee3b87db767915d15.tar.gz";
101 sha256 = "12dpxsbm2al633y87i8p784k2dn4bbskz6sl40v9f5ljjmjqjzxf";
105 facts = build-asdf-system {
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=";
112 lispLibs = [ self.lessp self.rollback self.local-time ];
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 ];
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" ];
127 swank = build-with-compile-into-pwd rec {
128 inherit (super.swank) pname lispLibs;
130 src = pkgs.fetchFromGitHub {
134 hash = "sha256-5hNB5XxbTER4HX3dn4umUGnw6UeiTQkczmggFz4uWoE=";
136 systems = [ "swank" "swank/exts" ];
137 patches = [ ./patches/swank-pure-paths.patch ];
139 substituteAllInPlace swank-loader.lisp
143 slynk = build-asdf-system {
146 src = pkgs.fetchFromGitHub {
147 owner = "joaotavora";
149 rev = "ba40c8f054ec3b7040a6c36a1ef3e9596b936421";
150 hash = "sha256-hoaCZtyezuXptDPnAvBTT0SZ14M9Ifrmki3beBOwFmI=";
153 "slynk" "slynk/arglists" "slynk/fancy-inspector"
154 "slynk/package-fu" "slynk/mrepl" "slynk/trace-dialog"
155 "slynk/profiler" "slynk/stickers" "slynk/indentation"
160 cephes = build-with-compile-into-pwd {
161 inherit (super.cephes) pname version src lispLibs;
162 patches = [ ./patches/cephes-make.patch ];
164 find \( -name '*.dll' -o -name '*.dylib' -o -name '*.so' \) -delete
167 substituteAllInPlace cephes.asd
170 find $out -name '*.o' -delete
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";
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
187 mathkit = build-asdf-system {
188 inherit (super.mathkit) pname version src asds ;
189 lispLibs = super.mathkit.lispLibs ++ [ super.sb-cga ];
192 stumpwm = super.stumpwm.overrideLispAttrs (o: rec {
194 src = pkgs.fetchFromGitHub {
198 hash = "sha256-zXj17ucgyFhv7P0qEr4cYSVRPGrL1KEIofXWN2trr/M=";
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
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
220 #+sb-core-compression :compression
221 #+sb-core-compression t
222 :toplevel #'stumpwm:stumpwm)
226 cp -v stumpwm $out/bin
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
239 #+sb-core-compression :compression
240 #+sb-core-compression t
241 :toplevel #'clfswm:main)
243 installPhase = o.installPhase + ''
245 mv $out/clfswm $out/bin
249 magicl = build-with-compile-into-pwd {
250 inherit (super.magicl) pname version src lispLibs;
251 nativeBuildInputs = [ pkgs.gfortran ];
252 nativeLibs = [ pkgs.openblas ];
255 cl-glib_dot_gio = throw "cl-glib_dot_gio was replaced by cl-gio";
257 cl-gtk4 = build-asdf-system {
260 src = pkgs.fetchFromGitHub {
261 owner = "bohonghuang";
263 rev = "ff60e3495cdbba5c09d0bb8aa49f3184cc060c8e";
264 hash = "sha256-06cyPf+5z+GE3YvZEJ67kC281nkwRz/hoaykTISsni0=";
266 lispLibs = with self; [
267 cl-gobject-introspection-wrapper
272 nativeBuildInputs = [
273 pkgs.gobject-introspection
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
289 nativeBuildInputs = [
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
307 nativeBuildInputs = [
315 cl-avro = build-asdf-system {
318 src = pkgs.fetchFromGitHub {
321 rev = "b8fa26320fa0ae88390215140d57f9cca937f691";
322 hash = "sha256-acXsotvKWuffrLbrG9YJ8yZc5E6WC8N0qCFCAiX6N0Q=";
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
331 frugal-uuid = super.frugal-uuid.overrideLispAttrs (o: {
334 "frugal-uuid/non-frugal"
335 "frugal-uuid/benchmark"
338 lispLibs = o.lispLibs ++ (with self; [
347 duckdb = super.duckdb.overrideLispAttrs (o: {
348 systems = [ "duckdb" "duckdb/test" "duckdb/benchmark" ];
351 polyclot = build-asdf-system {
354 src = pkgs.fetchfossil {
355 url = "https://fossil.turtleware.eu/fossil.turtleware.eu/polyclot";
356 rev = "18500c968b1fc1e2a915b5c70b8cddc4a2b54de51da4eedc5454e42bfea3b479";
357 sha256 = "sha256-KgBL1QQN4iG6d8E9GlKAuxSwkrY6Zy7e1ZzEDGKad+A=";
359 systems = [ "eu.turtleware.polyclot" "eu.turtleware.polyclot/demo" ];
360 lispLibs = with self; [ clim mcclim mcclim-layouts ];
363 kons-9 = build-asdf-system rec {
366 src = pkgs.fetchFromGitHub {
369 rev = "08770e7fbb839b91fd035f1cd4a50ecc81b42d57";
370 sha256 = "sha256-Tit/qmOU5+zp43/ecIXGbh4CtgWzltWM7tHdVWkga0k=";
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
381 nsb-cga = super.nsb-cga.overrideLispAttrs (oa: {
382 lispLibs = oa.lispLibs ++ [ self.sb-cga ];
385 qlot-cli = build-asdf-system rec {
389 src = pkgs.fetchFromGitHub {
392 rev = "refs/tags/${version}";
393 hash = "sha256-j9iT25Yz9Z6llCKwwiHlVNKLqwuKvY194LrAzXuljsE=";
396 lispLibs = with self; [
410 nativeBuildInputs = [
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"
423 #+sb-core-compression :compression
424 #+sb-core-compression t)
435 mv $out/qlot $out/bin
436 wrapProgram $out/bin/qlot \
437 --prefix LD_LIBRARY_PATH : $LD_LIBRARY_PATH
442 meta.mainProgram = "qlot";
445 fset = super.fset.overrideLispAttrs (oa: {
446 systems = [ "fset" "fset/test" ];
448 description = "functional collections library";
449 homepage = "https://gitlab.common-lisp.net/fset/fset/-/wikis/home";
450 license = pkgs.lib.licenses.llgpl21;
454 thih-coalton = self.coalton;
455 quil-coalton = self.coalton;
456 coalton = super.coalton.overrideLispAttrs (oa: {
465 lispLibs = oa.lispLibs ++ [ self.fiasco ];
466 nativeLibs = [ pkgs.mpfr ];
468 description = "statically typed functional programming language that supercharges Common Lisp";
469 homepage = "https://coalton-lang.github.io";
470 license = pkgs.lib.licenses.mit;