1 { build-asdf-system, lisp, quicklispPackagesFor, fixupFor, pkgs, ... }:
16 # Used by builds that would otherwise attempt to write into storeDir.
18 # Will run build two times, keeping all files created during the
19 # first run, exept the FASL's. Then using that directory tree as the
20 # source of the second run.
22 # E.g. cl-unicode creating .txt files during compilation
23 build-with-compile-into-pwd = args:
25 build = (build-asdf-system (args // { version = args.version + "-build"; }))
27 buildPhase = with builtins; ''
29 export LD_LIBRARY_PATH=${makeLibraryPath o.nativeLibs}:$LD_LIBRARY_PATH
30 export CLASSPATH=${makeSearchPath "share/java/*" o.javaLibs}:$CLASSPATH
31 export CL_SOURCE_REGISTRY=$CL_SOURCE_REGISTRY:$(pwd)//
32 export ASDF_OUTPUT_TRANSLATIONS="$(pwd):$(pwd)/__fasls:${storeDir}:${storeDir}"
33 ${o.lisp} ${o.buildScript}
41 in build-asdf-system (args // {
42 # Patches are already applied in `build`
48 isJVM = hasSuffix "abcl" (head (splitString " " lisp));
50 # Makes it so packages imported from Quicklisp can be re-used as
51 # lispLibs ofpackages in this file.
52 ql = quicklispPackagesFor { inherit lisp; fixup = fixupFor packages; };
56 asdf = build-with-compile-into-pwd {
60 url = "https://gitlab.common-lisp.net/asdf/asdf/-/archive/3.3.5.3/asdf-3.3.5.3.tar.gz";
61 sha256 = "0aw200awhg58smmbdmz80bayzmbm1a6547gv0wmc8yv89gjqldbv";
63 systems = [ "asdf" "uiop" ];
66 uiop = asdf.overrideLispAttrs(o: {
71 jna = pkgs.fetchMavenArtifact {
72 groupId = "net.java.dev.jna";
75 sha256 = "0qbis8acv04fi902qzak1mbagqaxcsv2zyp7b8y4shs5nj0cgz7a";
77 in build-asdf-system {
79 url = "http://beta.quicklisp.org/archive/cffi/2021-04-11/cffi_0.24.1.tgz";
80 sha256 = "17ryim4xilb1rzxydfr7595dnhqkk02lmrbkqrkvi9091shi4cj3";
89 javaLibs = optionals isJVM [ jna ];
92 cffi-libffi = ql.cffi-libffi.overrideLispAttrs (o: {
94 url = "https://github.com/cffi/cffi/archive/3f842b92ef808900bf20dae92c2d74232c2f6d3a.tar.gz";
95 sha256 = "1jilvmbbfrmb23j07lwmkbffc6r35wnvas5s4zjc84i856ccclm2";
97 patches = [ ./patches/cffi-libffi-darwin-ffi-h.patch ];
100 cl-unicode = build-with-compile-into-pwd {
101 pname = "cl-unicode";
103 src = pkgs.fetchzip {
104 url = "https://github.com/edicl/cl-unicode/archive/refs/tags/v0.1.6.tar.gz";
105 sha256 = "0ykx2s9lqfl74p1px0ik3l2izd1fc9jd1b4ra68s5x34rvjy0hza";
107 systems = [ "cl-unicode" ];
108 lispLibs = with ql; [
114 jzon = build-asdf-system {
115 src = pkgs.fetchzip {
116 url = "https://github.com/Zulu-Inuoe/jzon/archive/6b201d4208ac3f9721c461105b282c94139bed29.tar.gz";
117 sha256 = "01d4a78pjb1amx5amdb966qwwk9vblysm1li94n3g26mxy5zc2k3";
119 version = "0.0.0-20210905-6b201d4208";
124 systems = [ "com.inuoe.jzon" ];
127 cl-notify = build-asdf-system {
129 version = "20080904-138ca7038";
130 src = pkgs.fetchzip {
131 url = "https://repo.or.cz/cl-notify.git/snapshot/138ca703861f4a1fbccbed557f92cf4d213668a1.tar.gz";
132 sha256 = "0k6ns6fzvjcbpsqgx85r4g5m25fvrdw9481i9vyabwym9q8bbqwx";
142 cl-liballegro-nuklear = build-with-compile-into-pwd {
143 inherit (ql.cl-liballegro-nuklear) pname version src;
144 nativeBuildInputs = [ pkgs.allegro5 ];
145 nativeLibs = [ pkgs.allegro5 ];
146 lispLibs = ql.cl-liballegro-nuklear.lispLibs ++ [ ql.cl-liballegro ];
147 patches = [ ./patches/cl-liballegro-nuklear-missing-dll.patch ];
151 tuple = build-asdf-system {
153 version = "b74bd067d";
154 src = pkgs.fetchzip {
155 url = "https://fossil.galkowski.xyz/tuple/tarball/b74bd067d4533ac0/tuple.tar.gz";
156 sha256 = "0dk356vkv6kwwcmc3j08x7143549m94rd66rpkzq8zkb31cg2va8";
160 cl-tar-file = build-asdf-system {
161 pname = "cl-tar-file";
163 src = pkgs.fetchzip {
165 rev = "0c10bc82f14702c97a26dc25ce075b5d3a2347d1";
166 in "https://gitlab.common-lisp.net/cl-tar/cl-tar-file/-/archive/${rev}/cl-tar-file-${rev}.tar.gz";
167 sha256 = "0i8j05fkgdqy4c4pqj0c68sh4s3klpx9kc5wp73qwzrl3xqd2svy";
169 lispLibs = with ql; [
179 systems = [ "tar-file" "tar-file/test" ];
182 cl-tar = build-asdf-system {
185 src = pkgs.fetchzip {
187 rev = "7c6e07a10c93d9e311f087b5f6328cddd481669a";
188 in "https://gitlab.common-lisp.net/cl-tar/cl-tar/-/archive/${rev}/cl-tar-${rev}.tar.gz";
189 sha256 = "0wp23cs3i6a89dibifiz6559la5nk58d1n17xvbxq4nrl8cqsllf";
191 lispLibs = with ql; [
199 ] ++ [ cl-tar-file ];
210 "tar/simple-extract-test"
214 lessp = build-asdf-system {
216 version = "0.2-f8a9e4664";
217 src = pkgs.fetchzip {
218 url = "https://github.com/facts-db/cl-lessp/archive/632217602b85b679e8d420654a0aa39e798ca3b5.tar.gz";
219 sha256 = "0i3ia14dzqwjpygd0zn785ff5vqnnmkn75psfpyx0ni3jr71lkq9";
223 rollback = build-asdf-system {
225 version = "0.1-5d3f21fda";
226 src = pkgs.fetchzip {
227 url = "https://github.com/facts-db/cl-rollback/archive/5d3f21fda8f04f35c5e9d20ee3b87db767915d15.tar.gz";
228 sha256 = "12dpxsbm2al633y87i8p784k2dn4bbskz6sl40v9f5ljjmjqjzxf";
232 facts = build-asdf-system {
234 version = "0.1-632217602";
235 src = pkgs.fetchzip {
236 url = "https://github.com/facts-db/cl-lessp/archive/632217602b85b679e8d420654a0aa39e798ca3b5.tar.gz";
237 sha256 = "09z1vwzjm7hlb529jl3hcjnfd11gh128lmdg51im7ar4jv4746iw";
239 lispLibs = [ lessp rollback ] ++ [ ql.local-time ];
243 cl-fuse = build-with-compile-into-pwd {
244 inherit (ql.cl-fuse) pname version src lispLibs;
245 nativeBuildInputs = [ pkgs.fuse ];
246 nativeLibs = [ pkgs.fuse ];
249 cl-containers = build-asdf-system {
250 inherit (ql.cl-containers) pname version src;
251 lispLibs = ql.cl-containers.lispLibs ++ [ ql.moptilities ];
252 systems = [ "cl-containers" "cl-containers/with-moptilities" ];
255 swank = build-with-compile-into-pwd {
256 inherit (ql.swank) pname version src lispLibs;
257 patches = [ ./patches/swank-pure-paths.patch ];
259 substituteAllInPlace swank-loader.lisp
263 clx-truetype = build-asdf-system {
264 pname = "clx-truetype";
265 version = "20160825-git";
266 src = pkgs.fetchzip {
267 url = "http://beta.quicklisp.org/archive/clx-truetype/2016-08-25/clx-truetype-20160825-git.tgz";
268 sha256 = "079hyp92cjkdfn6bhkxsrwnibiqbz4y4af6nl31lzw6nm91j5j37";
270 lispLibs = with ql; [
271 alexandria bordeaux-threads cl-aa cl-fad cl-paths cl-paths-ttf
272 cl-store cl-vectors clx trivial-features zpb-ttf
276 mathkit = build-asdf-system {
277 inherit (ql.mathkit) pname version src asds lisp;
278 lispLibs = ql.mathkit.lispLibs ++ [ ql.sb-cga ];
281 nyxt-gtk = build-asdf-system {
282 inherit (ql.nyxt) pname lisp;
285 lispLibs = ql.nyxt.lispLibs ++ (with ql; [
286 cl-cffi-gtk cl-webkit2 mk-string-metrics
289 src = pkgs.fetchzip {
290 url = "https://github.com/atlas-engineer/nyxt/archive/2.2.4.tar.gz";
291 sha256 = "12l7ir3q29v06jx0zng5cvlbmap7p709ka3ik6x29lw334qshm9b";
294 nativeBuildInputs = [ pkgs.makeWrapper ];
296 # needed for GSETTINGS_SCHEMAS_PATH
297 pkgs.gsettings-desktop-schemas pkgs.glib pkgs.gtk3
299 # needed for XDG_ICON_DIRS
300 pkgs.gnome.adwaita-icon-theme
303 buildScript = pkgs.writeText "build-nyxt.lisp" ''
305 (asdf:load-system :nyxt/gtk-application)
306 (sb-ext:save-lisp-and-die "nyxt" :executable t
307 #+sb-core-compression :compression
308 #+sb-core-compression t
309 :toplevel #'nyxt:entry-point)
312 # Run with WEBKIT_FORCE_SANDBOX=0 if getting a runtime error in webkitgtk-2.34.4
313 installPhase = ql.nyxt.installPhase + ''
317 wrapProgram $out/bin/nyxt \
318 --prefix LD_LIBRARY_PATH : $LD_LIBRARY_PATH \
319 --prefix XDG_DATA_DIRS : $XDG_ICON_DIRS \
320 --prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \
321 --prefix GIO_EXTRA_MODULES ":" ${pkgs.dconf.lib}/lib/gio/modules/ \
322 --prefix GIO_EXTRA_MODULES ":" ${pkgs.glib-networking}/lib/gio/modules/
328 ltk = ql.ltk.overrideLispAttrs (o: {
329 src = pkgs.fetchzip {
330 url = "https://github.com/uthar/ltk/archive/f19162e76d6c7c2f51bd289b811d9ba20dd6555e.tar.gz";
331 sha256 = "0mzikv4abq9yqlj6dsji1wh34mjizr5prv6mvzzj29z1485fh1bj";
333 version = "f19162e76";