1 { build-asdf-system, spec, quicklispPackagesFor, stdenv, pkgs, ... }:
17 # Used by builds that would otherwise attempt to write into storeDir.
19 # Will run build two times, keeping all files created during the
20 # first run, exept the FASL's. Then using that directory tree as the
21 # source of the second run.
23 # E.g. cl-unicode creating .txt files during compilation
24 build-with-compile-into-pwd = args:
26 build = (build-asdf-system (args // { version = args.version + "-build"; }))
28 buildPhase = with builtins; ''
30 export ASDF_OUTPUT_TRANSLATIONS="$(pwd):$(pwd)/__fasls:${storeDir}:${storeDir}"
31 export CL_SOURCE_REGISTRY=$CL_SOURCE_REGISTRY:$(pwd)//
32 ${o.pkg}/bin/${o.program} ${toString (o.flags or [])} < ${o.buildScript}
40 in build-asdf-system (args // {
41 # Patches are already applied in `build`
47 isJVM = spec.pkg.pname == "abcl";
49 # Makes it so packages imported from Quicklisp can be re-used as
50 # lispLibs ofpackages in this file.
51 ql = quicklispPackagesFor spec;
53 packages = ql.overrideScope (self: super: {
56 jna = pkgs.fetchMavenArtifact {
57 groupId = "net.java.dev.jna";
60 sha256 = "0qbis8acv04fi902qzak1mbagqaxcsv2zyp7b8y4shs5nj0cgz7a";
62 in build-asdf-system {
64 url = "http://beta.quicklisp.org/archive/cffi/2021-04-11/cffi_0.24.1.tgz";
65 sha256 = "17ryim4xilb1rzxydfr7595dnhqkk02lmrbkqrkvi9091shi4cj3";
69 lispLibs = with super; [
74 javaLibs = optionals isJVM [ jna ];
77 cffi-libffi = build-asdf-system {
78 inherit (super.cffi-libffi) pname version asds lispLibs nativeLibs nativeBuildInputs;
80 url = "https://github.com/cffi/cffi/archive/3f842b92ef808900bf20dae92c2d74232c2f6d3a.tar.gz";
81 sha256 = "1jilvmbbfrmb23j07lwmkbffc6r35wnvas5s4zjc84i856ccclm2";
83 patches = optionals stdenv.isDarwin [ ./patches/cffi-libffi-darwin-ffi-h.patch ];
86 cl-unicode = build-with-compile-into-pwd {
90 url = "https://github.com/edicl/cl-unicode/archive/refs/tags/v0.1.6.tar.gz";
91 sha256 = "0ykx2s9lqfl74p1px0ik3l2izd1fc9jd1b4ra68s5x34rvjy0hza";
93 systems = [ "cl-unicode" ];
94 lispLibs = with super; [
100 jzon = build-asdf-system {
101 src = pkgs.fetchzip {
102 url = "https://github.com/Zulu-Inuoe/jzon/archive/6b201d4208ac3f9721c461105b282c94139bed29.tar.gz";
103 sha256 = "01d4a78pjb1amx5amdb966qwwk9vblysm1li94n3g26mxy5zc2k3";
105 version = "0.0.0-20210905-6b201d4208";
110 systems = [ "com.inuoe.jzon" ];
113 cl-notify = build-asdf-system {
115 version = "20080904-138ca7038";
116 src = pkgs.fetchzip {
117 url = "https://repo.or.cz/cl-notify.git/snapshot/138ca703861f4a1fbccbed557f92cf4d213668a1.tar.gz";
118 sha256 = "0k6ns6fzvjcbpsqgx85r4g5m25fvrdw9481i9vyabwym9q8bbqwx";
128 cl-liballegro-nuklear = build-with-compile-into-pwd {
129 inherit (super.cl-liballegro-nuklear) pname version src;
130 nativeBuildInputs = [ pkgs.allegro5 ];
131 nativeLibs = [ pkgs.allegro5 ];
132 lispLibs = super.cl-liballegro-nuklear.lispLibs ++ [ super.cl-liballegro ];
133 patches = [ ./patches/cl-liballegro-nuklear-missing-dll.patch ];
136 tuple = build-asdf-system {
138 version = "b74bd067d";
139 src = pkgs.fetchzip {
140 url = "https://fossil.galkowski.xyz/tuple/tarball/b74bd067d4533ac0/tuple.tar.gz";
141 sha256 = "0dk356vkv6kwwcmc3j08x7143549m94rd66rpkzq8zkb31cg2va8";
145 lessp = build-asdf-system {
147 version = "0.2-f8a9e4664";
148 src = pkgs.fetchzip {
149 url = "https://github.com/facts-db/cl-lessp/archive/632217602b85b679e8d420654a0aa39e798ca3b5.tar.gz";
150 sha256 = "0i3ia14dzqwjpygd0zn785ff5vqnnmkn75psfpyx0ni3jr71lkq9";
154 rollback = build-asdf-system {
156 version = "0.1-5d3f21fda";
157 src = pkgs.fetchzip {
158 url = "https://github.com/facts-db/cl-rollback/archive/5d3f21fda8f04f35c5e9d20ee3b87db767915d15.tar.gz";
159 sha256 = "12dpxsbm2al633y87i8p784k2dn4bbskz6sl40v9f5ljjmjqjzxf";
163 facts = build-asdf-system {
165 version = "0.1-632217602";
166 src = pkgs.fetchzip {
167 url = "https://beta.quicklisp.org/archive/cl-facts/2022-11-06/cl-facts-20221106-git.tgz";
168 sha256 = "sha256-PBpyyJYkq1NjKK9VikSAL4TmrGRwUJlEWRSeKj/f4Sc=";
170 lispLibs = [ self.lessp self.rollback ] ++ [ super.local-time ];
173 cl-fuse = build-with-compile-into-pwd {
174 inherit (super.cl-fuse) pname version src lispLibs;
175 nativeBuildInputs = [ pkgs.fuse ];
176 nativeLibs = [ pkgs.fuse ];
179 cl-containers = build-asdf-system {
180 inherit (super.cl-containers) pname version src;
181 lispLibs = super.cl-containers.lispLibs ++ [ super.moptilities ];
182 systems = [ "cl-containers" "cl-containers/with-moptilities" ];
185 swank = build-with-compile-into-pwd {
186 inherit (super.swank) pname version src lispLibs;
187 patches = [ ./patches/swank-pure-paths.patch ];
189 substituteAllInPlace swank-loader.lisp
193 clx-truetype = build-asdf-system {
194 pname = "clx-truetype";
195 version = "20160825-git";
196 src = pkgs.fetchzip {
197 url = "http://beta.quicklisp.org/archive/clx-truetype/2016-08-25/clx-truetype-20160825-git.tgz";
198 sha256 = "079hyp92cjkdfn6bhkxsrwnibiqbz4y4af6nl31lzw6nm91j5j37";
200 lispLibs = with super; [
201 alexandria bordeaux-threads cl-aa cl-fad cl-paths cl-paths-ttf
202 cl-store cl-vectors clx trivial-features zpb-ttf
206 mathkit = build-asdf-system {
207 inherit (super.mathkit) pname version src asds ;
208 lispLibs = super.mathkit.lispLibs ++ [ super.sb-cga ];
211 cl-colors2_0_5_4 = build-asdf-system {
212 inherit (super.cl-colors2) pname systems lispLibs;
215 src = pkgs.fetchgit {
216 url = "https://notabug.org/cage/cl-colors2";
217 rev = "refs/tags/v0.5.4";
218 sha256 = "sha256-JbT1BKjaXDwdlzHLPjX1eg0RMIOT86R17SPgbe2h+tA=";
222 prompter = build-asdf-system {
226 src = pkgs.fetchFromGitHub {
227 owner = "atlas-engineer";
230 sha256 = "sha256-Duv7L2lMjr3VXsoujQDOMNHCbdUDX4RWoncVm9LDCZE=";
243 super.trivial-package-local-nicknames
248 nasdf = build-asdf-system {
250 version = "20230911-git";
251 src = pkgs.fetchFromGitHub {
252 owner = "atlas-engineer";
254 rev = "ab7a018f3a67a999c72710644b10b4545130c139";
255 sha256 = "sha256-fXGh0h6CXLoBgK1jRxkSNyQVAY1gvi4iyHQBuzueR5Y=";
259 njson = build-asdf-system {
262 src = pkgs.fetchFromGitHub {
263 owner = "atlas-engineer";
266 sha256 = "sha256-hVo5++QCns7Mv3zATpAP3EVz1pbj+jbQmzSLqs6hqQo=";
268 lispLibs = [ self.nasdf super.cl-json super.com_dot_inuoe_dot_jzon];
269 systems = [ "njson" "njson/cl-json" "njson/jzon"];
272 nsymbols = build-asdf-system {
275 src = pkgs.fetchFromGitHub {
276 owner = "atlas-engineer";
279 sha256 = "sha256-KcrE06bG5Khp5/807wb/TbPG3nWTlNWHrDpmK6bm7ZM=";
281 lispLibs = [ super.closer-mop ];
282 systems = [ "nsymbols" "nsymbols/star" ];
286 nclasses = build-asdf-system {
289 src = pkgs.fetchFromGitHub {
290 owner = "atlas-engineer";
293 sha256 = "sha256-JupP+TIxavUoyOPnp57FqpEjWfgKspdFoSRnV2rk5U4=";
295 lispLibs = [ self.nasdf super.moptilities ];
298 nfiles = build-asdf-system {
300 version = "20230705-git";
301 src = pkgs.fetchFromGitHub {
302 owner = "atlas-engineer";
304 rev = "3626e8d512a84efc12479ceb3969d194511757f7";
305 sha256 = "sha256-MoJdbTOVfw2rJk4cf/rEnR55BxdXkoqqu9Txd/R9OYQ=";
314 super.trivial-garbage
315 super.trivial-package-local-nicknames
320 nhooks = build-asdf-system {
323 src = pkgs.fetchFromGitHub {
324 owner = "atlas-engineer";
327 hash = "sha256-D61QHxHTceIu5mCGKf3hy53niQMfs0idEYQK1ZYn1YM=";
329 lispLibs = with self; [ bordeaux-threads closer-mop serapeum ];
332 nkeymaps = build-asdf-system rec {
335 src = pkgs.fetchFromGitHub {
336 owner = "atlas-engineer";
339 hash = "sha256-ewMu2IgEzCYY72vG91IA7l8X78Ph6jpQvbKeOFZdAyM=";
341 lispLibs = with self; [ alexandria fset trivial-package-local-nicknames
346 history-tree = build-asdf-system rec {
347 pname = "history-tree";
349 src = pkgs.fetchFromGitHub {
350 owner = "atlas-engineer";
351 repo = "history-tree";
353 hash = "sha256-lOORalyTybdut/If+dBXS4PlZt2AnZrEI/qjQWS03pk=";
355 lispLibs = with self; [
361 trivial-package-local-nicknames
365 nyxt-gtk = build-asdf-system {
369 lispLibs = (with super; [
409 trivial-package-local-nicknames
416 # TODO: Remove these overrides after quicklisp updates past the June 2023 release
417 (trivial-clipboard.overrideAttrs (final: prev: {
418 src = pkgs.fetchFromGitHub {
420 repo = "trivial-clipboard";
421 rev = "6ddf8d5dff8f5c2102af7cd1a1751cbe6408377b";
422 sha256 = "sha256-n15IuTkqAAh2c1OfNbZfCAQJbH//QXeH0Bl1/5OpFRM=";
424 (cl-gobject-introspection.overrideAttrs (final: prev: {
425 src = pkgs.fetchFromGitHub {
427 repo = "cl-gobject-introspection";
428 rev = "83beec4492948b52aae4d4152200de5d5c7ac3e9";
429 sha256 = "sha256-g/FwWE+Rzmzm5Y+irvd1AJodbp6kPHJIFOFDPhaRlXc=";
431 (cl-webkit2.overrideAttrs (final: prev: {
432 src = pkgs.fetchFromGitHub {
435 rev = "66fd0700111586425c9942da1694b856fb15cf41";
436 sha256 = "sha256-t/B9CvQTekEEsM/ZEp47Mn6NeZaTYFsTdRqclfX9BNg=";
454 src = pkgs.fetchFromGitHub {
455 owner = "atlas-engineer";
458 sha256 = "sha256-bZoAE0FErgXPylOzh6AfMq3befms9dHms8+slbYdctk=";
461 nativeBuildInputs = [ pkgs.makeWrapper ];
464 # needed for GSETTINGS_SCHEMAS_PATH
465 pkgs.gsettings-desktop-schemas pkgs.glib pkgs.gtk3
467 # needed for XDG_ICON_DIRS
468 pkgs.gnome.adwaita-icon-theme
471 # This patch removes the :build-operation component from the nyxt/gi-gtk-application system.
472 # This is done because if asdf:operate is used and the operation matches the system's :build-operation
473 # then output translations are ignored, causing the result of the operation to be placed where
474 # the .asd is located, which in this case is the nix store.
475 # see: https://gitlab.common-lisp.net/asdf/asdf/-/blob/master/doc/asdf.texinfo#L2582
476 patches = [ ./patches/nyxt-remove-build-operation.patch ];
478 buildScript = pkgs.writeText "build-nyxt.lisp" ''
479 (load "${super.alexandria.asdfFasl}/asdf.${super.alexandria.faslExt}")
480 ;; There's a weird error while copy/pasting in Nyxt that manifests with sb-ext:save-lisp-and-die, so we use asdf:operare :program-op instead
481 (asdf:operate :program-op :nyxt/gi-gtk-application)
484 # TODO(kasper): use wrapGAppsHook
491 wrapProgram $out/bin/nyxt \
492 --prefix LD_LIBRARY_PATH : $LD_LIBRARY_PATH \
493 --prefix XDG_DATA_DIRS : $XDG_ICON_DIRS \
494 --prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \
495 --prefix GI_TYPELIB_PATH : $GI_TYPELIB_PATH \
496 --prefix GIO_EXTRA_MODULES ":" ${pkgs.dconf.lib}/lib/gio/modules/ \
497 --prefix GIO_EXTRA_MODULES ":" ${pkgs.glib-networking}/lib/gio/modules/
501 nyxt = self.nyxt-gtk;
503 stumpwm = super.stumpwm.overrideLispAttrs (o: rec {
505 src = pkgs.fetchFromGitHub {
509 hash = "sha256-zXj17ucgyFhv7P0qEr4cYSVRPGrL1KEIofXWN2trr/M=";
511 buildScript = pkgs.writeText "build-stumpwm.lisp" ''
512 (load "${super.stumpwm.asdfFasl}/asdf.${super.stumpwm.faslExt}")
514 (asdf:load-system 'stumpwm)
516 ;; Prevents package conflict error
517 (when (uiop:version<= "3.1.5" (asdf:asdf-version))
518 (uiop:symbol-call '#:asdf '#:register-immutable-system :stumpwm)
519 (dolist (system-name (uiop:symbol-call '#:asdf
521 (asdf:find-system :stumpwm)))
522 (uiop:symbol-call '#:asdf '#:register-immutable-system system-name)))
524 ;; Prevents "cannot create /homeless-shelter" error
525 (asdf:disable-output-translations)
527 (sb-ext:save-lisp-and-die
531 #+sb-core-compression :compression
532 #+sb-core-compression t
533 :toplevel #'stumpwm:stumpwm)
537 cp -v stumpwm $out/bin
541 stumpwm-unwrapped = super.stumpwm;
543 ltk = super.ltk.overrideLispAttrs (o: {
544 src = pkgs.fetchzip {
545 url = "https://github.com/uthar/ltk/archive/f19162e76d6c7c2f51bd289b811d9ba20dd6555e.tar.gz";
546 sha256 = "0mzikv4abq9yqlj6dsji1wh34mjizr5prv6mvzzj29z1485fh1bj";
548 version = "f19162e76";
552 magicl = build-with-compile-into-pwd {
553 inherit (super.magicl) pname version src lispLibs;
554 nativeBuildInputs = [ pkgs.gfortran ];
555 nativeLibs = [ pkgs.openblas ];
556 patches = [ ./patches/magicl-dont-build-fortran-twice.patch ];
559 cl-glib = build-asdf-system {
562 src = pkgs.fetchFromGitHub {
563 owner = "bohonghuang";
565 rev = "84b128192d6b11cf03f1150e474a23368f07edff";
566 hash = "sha256-A56Yz+W4n1rAxxZg15zfkrLMbKMEG/zsWqaX7+kx4Qg=";
568 lispLibs = with super; [
569 cl-gobject-introspection-wrapper
574 cl-glib_dot_gio = build-asdf-system {
575 pname = "cl-glib.gio";
577 src = pkgs.fetchFromGitHub {
578 owner = "bohonghuang";
580 rev = "84b128192d6b11cf03f1150e474a23368f07edff";
581 hash = "sha256-A56Yz+W4n1rAxxZg15zfkrLMbKMEG/zsWqaX7+kx4Qg=";
583 lispLibs = with super; [
584 cl-gobject-introspection-wrapper
588 cl-gtk4 = build-asdf-system {
591 src = pkgs.fetchFromGitHub {
592 owner = "bohonghuang";
594 rev = "e18f621b996fd986d9829d590203c690440dee64";
595 hash = "sha256-++qydw6db4O3m+DAjutVPN8IuePOxseo9vhWEvwiR6E=";
597 lispLibs = with super; [
598 cl-gobject-introspection-wrapper
599 ] ++ [ self.cl-glib self.cl-glib_dot_gio ];
600 nativeBuildInputs = [
601 pkgs.gobject-introspection
609 cl-gtk4_dot_adw = build-asdf-system {
610 pname = "cl-gtk4.adw";
612 src = pkgs.fetchFromGitHub {
613 owner = "bohonghuang";
615 rev = "e18f621b996fd986d9829d590203c690440dee64";
616 hash = "sha256-++qydw6db4O3m+DAjutVPN8IuePOxseo9vhWEvwiR6E=";
618 lispLibs = with super; [
619 cl-gobject-introspection-wrapper
620 ] ++ [ self.cl-gtk4 ];
621 nativeBuildInputs = [
629 cl-gtk4_dot_webkit2 = build-asdf-system {
630 pname = "cl-gtk4.webkit2";
632 src = pkgs.fetchFromGitHub {
633 owner = "bohonghuang";
635 rev = "e18f621b996fd986d9829d590203c690440dee64";
636 hash = "sha256-++qydw6db4O3m+DAjutVPN8IuePOxseo9vhWEvwiR6E=";
638 lispLibs = with super; [
639 cl-gobject-introspection-wrapper
640 ] ++ [ self.cl-gtk4 ];
641 nativeBuildInputs = [
647 # Requires old webkitgtk_5_0 which was replaced by webkitgtk_6_0
651 cl-avro = build-asdf-system {
654 src = pkgs.fetchFromGitHub {
657 rev = "7d624253e98afb987a01729bd72c99bae02f0d7d";
658 hash = "sha256-AlTn+Q1gKnAFEfcnz9+VeHz681pPIirg2za3VXYiNWk=";
660 lispLibs = with super; [
673 trivial-extensible-sequences
677 trivial-clock = build-asdf-system {
678 pname = "trivial-clock";
680 src = pkgs.fetchFromGitHub {
682 repo = "cl-trivial-clock";
683 rev = "641e12ab1763914996beb1ceee67aabc9f1a3b1e";
684 hash = "sha256-mltQEJ2asxyQ/aS/9BuWmN3XZ9bGmmkopcF5YJU1cPk=";
686 systems = [ "trivial-clock" "trivial-clock/test" ];
687 lispLibs = [ self.cffi self.fiveam ];
690 frugal-uuid = build-asdf-system {
691 pname = "frugal-uuid";
693 src = pkgs.fetchFromGitHub {
695 repo = "cl-frugal-uuid";
696 rev = "be27972333a16fc3f16bc7fbf9e3013b2123d75c";
697 hash = "sha256-rWO43vWMibF8/OxL70jle5nhd9oRWC7+MI44KWrQD48=";
699 systems = [ "frugal-uuid"
700 "frugal-uuid/non-frugal"
701 "frugal-uuid/benchmark"
702 "frugal-uuid/test" ];
703 lispLibs = with self; [
713 duckdb = build-asdf-system {
716 src = pkgs.fetchFromGitHub {
719 rev = "3ed1df5ba5c738a0b7fed7aa73632ec86f558d09";
720 hash = "sha256-AJMxhtDACe6WTwEOxLsC8y6uBaPqjt8HLRw/eIZI02E=";
722 systems = [ "duckdb" "duckdb/test" "duckdb/benchmark" ];
723 lispLibs = with self; [
736 nativeLibs = with pkgs; [
741 polyclot = build-asdf-system {
744 src = pkgs.fetchfossil {
745 url = "https://fossil.turtleware.eu/polyclot";
746 rev = "e678b3c3e002f53b446780406c9ed13f8451309d22a1dc50ced4dbeedf08a1ec";
747 sha256 = "sha256-J08bU9HSVbzEivYtQsyIYPZJTrugj+jJSa4LglS0Olg=";
749 systems = [ "eu.turtleware.polyclot" "eu.turtleware.polyclot/demo" ];
750 lispLibs = with super; [ clim mcclim mcclim-layouts ];
753 kons-9 = build-asdf-system rec {
756 src = pkgs.fetchFromGitHub {
759 rev = "95ad44fac0566f445c4b7bd040339dcff75ee992";
760 sha256 = "19rl7372j9f1cv2kl55r8vyf4dhcz4way4hkjgysbxzrb1psp17n";
762 systems = [ "kons-9" "kons-9/testsuite" ];
763 lispLibs = with super; [
764 closer-mop trivial-main-thread trivial-backtrace cffi cl-opengl cl-glu
765 cl-glfw3 cl-paths-ttf zpb-ttf cl-vectors origin clobber
766 org_dot_melusina_dot_confidence
770 sb-cga = build-asdf-system {
773 src = pkgs.fetchFromGitHub {
776 rev = "9a554ea1c01cac998ff7eaa5f767bc5bcdc4c094";
777 sha256 = "sha256-iBM+VXu6JRqGmeIFzfXbGot+elvangmfSpDB7DjFpPg";
779 lispLibs = [ super.alexandria ];
782 nsb-cga = super.nsb-cga.overrideLispAttrs (oa: {
783 lispLibs = oa.lispLibs ++ [ self.sb-cga ];