diff --git a/third_party/lisp/alexandria.nix b/third_party/lisp/alexandria.nix index b522e2d14..538c21d81 100644 --- a/third_party/lisp/alexandria.nix +++ b/third_party/lisp/alexandria.nix @@ -2,7 +2,7 @@ # pretty much everything depends on. { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.alexandria; +let src = with pkgs; srcOnly sbcl.pkgs.alexandria; in depot.nix.buildLisp.library { name = "alexandria"; diff --git a/third_party/lisp/anaphora.nix b/third_party/lisp/anaphora.nix index c079943e6..dfcb392c2 100644 --- a/third_party/lisp/anaphora.nix +++ b/third_party/lisp/anaphora.nix @@ -1,6 +1,6 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.anaphora; +let src = with pkgs; srcOnly sbcl.pkgs.anaphora; in depot.nix.buildLisp.library { name = "anaphora"; diff --git a/third_party/lisp/babel.nix b/third_party/lisp/babel.nix index ae7c5dd23..56de72738 100644 --- a/third_party/lisp/babel.nix +++ b/third_party/lisp/babel.nix @@ -1,7 +1,7 @@ # Babel is an encoding conversion library for Common Lisp. { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.babel; +let src = with pkgs; srcOnly sbcl.pkgs.babel; in depot.nix.buildLisp.library { name = "babel"; deps = [ diff --git a/third_party/lisp/bordeaux-threads.nix b/third_party/lisp/bordeaux-threads.nix index 8a2e09950..1edac4cd3 100644 --- a/third_party/lisp/bordeaux-threads.nix +++ b/third_party/lisp/bordeaux-threads.nix @@ -3,22 +3,45 @@ { depot, pkgs, ... }: let - src = with pkgs; srcOnly lispPackages.bordeaux-threads; - getSrc = f: "${src}/src/${f}"; + src = with pkgs; srcOnly sbcl.pkgs.bordeaux-threads; + getSrc = f: "${src}/${f}"; in depot.nix.buildLisp.library { name = "bordeaux-threads"; - deps = [ depot.third_party.lisp.alexandria ]; + deps = [ + depot.third_party.lisp.alexandria + depot.third_party.lisp.global-vars + depot.third_party.lisp.trivial-features + depot.third_party.lisp.trivial-garbage + ]; srcs = map getSrc [ - "pkgdcl.lisp" - "bordeaux-threads.lisp" + "apiv1/pkgdcl.lisp" + "apiv1/bordeaux-threads.lisp" ] ++ [ { - sbcl = getSrc "impl-sbcl.lisp"; - ecl = getSrc "impl-ecl.lisp"; + sbcl = getSrc "apiv1/impl-sbcl.lisp"; + ecl = getSrc "apiv1/impl-ecl.lisp"; + ccl = getSrc "apiv1/impl-clozure.lisp"; } ] ++ map getSrc [ - "default-implementations.lisp" + "apiv1/default-implementations.lisp" + + "apiv2/pkgdcl.lisp" + "apiv2/bordeaux-threads.lisp" + "apiv2/timeout-interrupt.lisp" + ] ++ [ + { + sbcl = getSrc "apiv2/impl-sbcl.lisp"; + ecl = getSrc "apiv2/impl-ecl.lisp"; + ccl = getSrc "apiv2/impl-clozure.lisp"; + } + (getSrc "apiv2/api-locks.lisp") + (getSrc "apiv2/api-threads.lisp") + (getSrc "apiv2/api-semaphores.lisp") + { + ccl = getSrc "apiv2/impl-condition-variables-semaphores.lisp"; + } + (getSrc "apiv2/api-condition-variables.lisp") ]; } diff --git a/third_party/lisp/cffi.nix b/third_party/lisp/cffi.nix index de1d0c2e8..63cc7932d 100644 --- a/third_party/lisp/cffi.nix +++ b/third_party/lisp/cffi.nix @@ -2,7 +2,7 @@ { depot, pkgs, ... }: with depot.nix; -let src = with pkgs; srcOnly lispPackages.cffi; +let src = with pkgs; srcOnly sbcl.pkgs.cffi; in buildLisp.library { name = "cffi"; deps = with depot.third_party.lisp; [ @@ -13,13 +13,14 @@ in buildLisp.library { ]; srcs = [ + "${src}/src/package.lisp" + "${src}/src/sys-utils.lisp" { ecl = src + "/src/cffi-ecl.lisp"; sbcl = src + "/src/cffi-sbcl.lisp"; ccl = src + "/src/cffi-openmcl.lisp"; } ] ++ map (f: src + ("/src/" + f)) [ - "package.lisp" "utils.lisp" "libraries.lisp" "early-types.lisp" diff --git a/third_party/lisp/chipz.nix b/third_party/lisp/chipz.nix index 59e9914ee..ccde3cb42 100644 --- a/third_party/lisp/chipz.nix +++ b/third_party/lisp/chipz.nix @@ -1,7 +1,7 @@ # Common Lisp library for decompressing deflate, zlib, gzip, and bzip2 data { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.chipz; +let src = with pkgs; srcOnly sbcl.pkgs.chipz; in depot.nix.buildLisp.library { name = "chipz"; deps = [ (depot.nix.buildLisp.bundled "asdf") ]; diff --git a/third_party/lisp/chunga.nix b/third_party/lisp/chunga.nix index d3f50bcb1..ea676af79 100644 --- a/third_party/lisp/chunga.nix +++ b/third_party/lisp/chunga.nix @@ -1,7 +1,7 @@ # Portable chunked streams for Common Lisp { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.chunga; +let src = with pkgs; srcOnly sbcl.pkgs.chunga; in depot.nix.buildLisp.library { name = "chunga"; deps = with depot.third_party.lisp; [ diff --git a/third_party/lisp/cl-ansi-text.nix b/third_party/lisp/cl-ansi-text.nix index 0e3401524..e7b929032 100644 --- a/third_party/lisp/cl-ansi-text.nix +++ b/third_party/lisp/cl-ansi-text.nix @@ -1,7 +1,7 @@ # Enables ANSI colors for printing. { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.cl-ansi-text; +let src = with pkgs; srcOnly sbcl.pkgs.cl-ansi-text; in depot.nix.buildLisp.library { name = "cl-ansi-text"; deps = with depot.third_party.lisp; [ diff --git a/third_party/lisp/cl-base64.nix b/third_party/lisp/cl-base64.nix index 08055a047..89e8090b9 100644 --- a/third_party/lisp/cl-base64.nix +++ b/third_party/lisp/cl-base64.nix @@ -1,7 +1,7 @@ # Base64 encoding for Common Lisp { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.cl-base64; +let src = with pkgs; srcOnly sbcl.pkgs.cl-base64; in depot.nix.buildLisp.library { name = "cl-base64"; srcs = [ diff --git a/third_party/lisp/cl-change-case.nix b/third_party/lisp/cl-change-case.nix index b66368a9b..8c20f9e66 100644 --- a/third_party/lisp/cl-change-case.nix +++ b/third_party/lisp/cl-change-case.nix @@ -1,6 +1,6 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.cl-change-case; +let src = with pkgs; srcOnly sbcl.pkgs.cl-change-case; in depot.nix.buildLisp.library { name = "cl-change-case"; diff --git a/third_party/lisp/cl-colors.nix b/third_party/lisp/cl-colors.nix index b51e4d46a..b206a55ea 100644 --- a/third_party/lisp/cl-colors.nix +++ b/third_party/lisp/cl-colors.nix @@ -1,6 +1,6 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.cl-colors; +let src = with pkgs; srcOnly sbcl.pkgs.cl-colors; in depot.nix.buildLisp.library { name = "cl-colors"; deps = [ diff --git a/third_party/lisp/cl-colors2.nix b/third_party/lisp/cl-colors2.nix index 34201bc2f..6c3fe8d33 100644 --- a/third_party/lisp/cl-colors2.nix +++ b/third_party/lisp/cl-colors2.nix @@ -1,11 +1,17 @@ +# TODO(sterni): package (switch to?) cl-colors-ng { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.cl-colors2; +let src = with pkgs; srcOnly sbcl.pkgs.cl-colors2; in depot.nix.buildLisp.library { name = "cl-colors2"; deps = with depot.third_party.lisp; [ alexandria cl-ppcre + parse-number + { + sbcl = depot.nix.buildLisp.bundled "uiop"; + default = depot.nix.buildLisp.bundled "asdf"; + } ]; srcs = map (f: src + ("/" + f)) [ @@ -13,6 +19,8 @@ in depot.nix.buildLisp.library { "colors.lisp" "colornames-x11.lisp" "colornames-svg.lisp" + "colornames-gdk.lisp" "hexcolors.lisp" + "print.lisp" ]; } diff --git a/third_party/lisp/cl-fad.nix b/third_party/lisp/cl-fad.nix index 9350abe2e..bffeb2e26 100644 --- a/third_party/lisp/cl-fad.nix +++ b/third_party/lisp/cl-fad.nix @@ -3,7 +3,7 @@ with depot.nix; -let src = with pkgs; srcOnly lispPackages.cl-fad; +let src = with pkgs; srcOnly sbcl.pkgs.cl-fad; in buildLisp.library { name = "cl-fad"; diff --git a/third_party/lisp/cl-plus-ssl.nix b/third_party/lisp/cl-plus-ssl.nix index dc0a95944..a302159ad 100644 --- a/third_party/lisp/cl-plus-ssl.nix +++ b/third_party/lisp/cl-plus-ssl.nix @@ -4,12 +4,9 @@ with depot.nix; let - src = pkgs.fetchgit { - url = "https://github.com/cl-plus-ssl/cl-plus-ssl.git"; - rev = "29081992f6d7b4e3aa2c5eeece4cd92b745071f4"; - hash = "sha256:16lyrixl98b7vy29dbbzkbq0xaz789350dajrr1gdny5i55rkjq0"; - }; + src = pkgs.srcOnly pkgs.sbcl.pkgs.cl_plus_ssl; in + buildLisp.library { name = "cl-plus-ssl"; deps = with depot.third_party.lisp; [ @@ -20,6 +17,7 @@ buildLisp.library { trivial-features trivial-garbage trivial-gray-streams + usocket { scbl = buildLisp.bundled "uiop"; default = buildLisp.bundled "asdf"; @@ -30,15 +28,18 @@ buildLisp.library { native = [ pkgs.openssl ]; srcs = map (f: src + ("/src/" + f)) [ + "config.lisp" "package.lisp" "reload.lisp" - "conditions.lisp" "ffi.lisp" - "x509.lisp" + "bio.lisp" + "conditions.lisp" + "ssl-funcall.lisp" + "init.lisp" "ffi-buffer-all.lisp" "ffi-buffer.lisp" "streams.lisp" - "bio.lisp" + "x509.lisp" "random.lisp" "context.lisp" "verify-hostname.lisp" diff --git a/third_party/lisp/cl-ppcre.nix b/third_party/lisp/cl-ppcre.nix index 7cb99db63..6861bef6a 100644 --- a/third_party/lisp/cl-ppcre.nix +++ b/third_party/lisp/cl-ppcre.nix @@ -1,7 +1,7 @@ # cl-ppcre is a Common Lisp regular expression library. { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.cl-ppcre; +let src = with pkgs; srcOnly sbcl.pkgs.cl-ppcre; in depot.nix.buildLisp.library { name = "cl-ppcre"; diff --git a/third_party/lisp/cl-prevalence.nix b/third_party/lisp/cl-prevalence.nix index 188cbc686..01476699f 100644 --- a/third_party/lisp/cl-prevalence.nix +++ b/third_party/lisp/cl-prevalence.nix @@ -2,12 +2,12 @@ # an in-memory database) { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.cl-prevalence; +let src = with pkgs; srcOnly sbcl.pkgs.cl-prevalence; in depot.nix.buildLisp.library { name = "cl-prevalence"; deps = with depot.third_party.lisp; [ - bordeaux-threads + moptilities s-xml s-sysdeps ]; @@ -22,4 +22,8 @@ in depot.nix.buildLisp.library { "master-slave.lisp" "blob.lisp" ]; + + brokenOn = [ + "ecl" # see moptilities + ]; } diff --git a/third_party/lisp/cl-smtp.nix b/third_party/lisp/cl-smtp.nix index 7ab9bea59..a3b7c179d 100644 --- a/third_party/lisp/cl-smtp.nix +++ b/third_party/lisp/cl-smtp.nix @@ -1,12 +1,13 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.cl-smtp; +let src = with pkgs; srcOnly sbcl.pkgs.cl-smtp; in depot.nix.buildLisp.library { name = "cl-smtp"; deps = with depot.third_party.lisp; [ + alexandria usocket - trivial-gray-streams flexi-streams + frugal-uuid-non-frugal cl-base64 cl-plus-ssl ]; diff --git a/third_party/lisp/cl-who.nix b/third_party/lisp/cl-who.nix index 601b09f11..3aebb0532 100644 --- a/third_party/lisp/cl-who.nix +++ b/third_party/lisp/cl-who.nix @@ -1,6 +1,6 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.cl-who; +let src = with pkgs; srcOnly sbcl.pkgs.cl-who; in depot.nix.buildLisp.library { name = "cl-who"; diff --git a/third_party/lisp/closer-mop.nix b/third_party/lisp/closer-mop.nix index 145b9cfd4..5e946aa81 100644 --- a/third_party/lisp/closer-mop.nix +++ b/third_party/lisp/closer-mop.nix @@ -3,7 +3,7 @@ # Lisp implementations { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.closer-mop; +let src = with pkgs; srcOnly sbcl.pkgs.closer-mop; in depot.nix.buildLisp.library { name = "closer-mop"; diff --git a/third_party/lisp/closure-common.nix b/third_party/lisp/closure-common.nix index 164e75233..ed5726dbb 100644 --- a/third_party/lisp/closure-common.nix +++ b/third_party/lisp/closure-common.nix @@ -1,7 +1,7 @@ { depot, pkgs, ... }: let - src = with pkgs; srcOnly lispPackages.closure-common; + src = with pkgs; srcOnly sbcl.pkgs.closure-common; getSrcs = builtins.map (p: "${src}/${p}"); in depot.nix.buildLisp.library { diff --git a/third_party/lisp/closure-html/default.nix b/third_party/lisp/closure-html/default.nix index 5e9eacdcb..f0d73c760 100644 --- a/third_party/lisp/closure-html/default.nix +++ b/third_party/lisp/closure-html/default.nix @@ -3,7 +3,7 @@ let src = pkgs.applyPatches { name = "closure-html-source"; - src = pkgs.lispPackages.closure-html.src; + src = pkgs.sbcl.pkgs.closure-html.src; patches = [ # delete unexported and unused double defun in sgml-dtd.lisp diff --git a/third_party/lisp/defclass-std.nix b/third_party/lisp/defclass-std.nix index c31ddb3c5..ba22ed5e6 100644 --- a/third_party/lisp/defclass-std.nix +++ b/third_party/lisp/defclass-std.nix @@ -2,7 +2,7 @@ # Seems to be unmaintained (since early 2021) { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.defclass-std; +let src = with pkgs; srcOnly sbcl.pkgs.defclass-std; in depot.nix.buildLisp.library { name = "defclass-std"; deps = with depot.third_party.lisp; [ diff --git a/third_party/lisp/drakma.nix b/third_party/lisp/drakma.nix index 607f438d7..699d442c5 100644 --- a/third_party/lisp/drakma.nix +++ b/third_party/lisp/drakma.nix @@ -1,7 +1,7 @@ # Drakma is an HTTP client for Common Lisp. { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.drakma; +let src = with pkgs; srcOnly sbcl.pkgs.drakma; in depot.nix.buildLisp.library { name = "drakma"; deps = with depot.third_party.lisp; [ diff --git a/third_party/lisp/fiveam.nix b/third_party/lisp/fiveam.nix index 500e980a8..b27cf9c70 100644 --- a/third_party/lisp/fiveam.nix +++ b/third_party/lisp/fiveam.nix @@ -4,7 +4,7 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.fiveam; +let src = with pkgs; srcOnly sbcl.pkgs.fiveam; in depot.nix.buildLisp.library { name = "fiveam"; diff --git a/third_party/lisp/flexi-streams.nix b/third_party/lisp/flexi-streams.nix index a6a06d4ad..492d4c460 100644 --- a/third_party/lisp/flexi-streams.nix +++ b/third_party/lisp/flexi-streams.nix @@ -1,7 +1,7 @@ # Flexible bivalent streams for Common Lisp { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.flexi-streams; +let src = with pkgs; srcOnly sbcl.pkgs.flexi-streams; in depot.nix.buildLisp.library { name = "flexi-streams"; deps = [ depot.third_party.lisp.trivial-gray-streams ]; diff --git a/third_party/lisp/frugal-uuid-non-frugal.nix b/third_party/lisp/frugal-uuid-non-frugal.nix new file mode 100644 index 000000000..875f7b9d8 --- /dev/null +++ b/third_party/lisp/frugal-uuid-non-frugal.nix @@ -0,0 +1,32 @@ +{ depot, pkgs, ... }: + +let + inherit (depot.nix) buildLisp; + inherit (pkgs.sbcl.pkgs.frugal-uuid) src; +in + +buildLisp.library { + # TODO(sterni): can't use / since name influences paths + name = "frugal-uuid-non-frugal"; + + deps = [ + depot.third_party.lisp.frugal-uuid + depot.third_party.lisp.babel + depot.third_party.lisp.bordeaux-threads + depot.third_party.lisp.ironclad + depot.third_party.lisp.trivial-clock + ]; + + # Note that these can be built individually, but we don't bother (yet) + srcs = builtins.map (f: "${src}/non-frugal/${f}") [ + "strong-random" + "thread-safe" + "name-based" + "accurate-clock" + "minara" + ]; + + brokenOn = [ + "ecl" # trivial-clock + ]; +} diff --git a/third_party/lisp/frugal-uuid.nix b/third_party/lisp/frugal-uuid.nix new file mode 100644 index 000000000..c22cc7ba8 --- /dev/null +++ b/third_party/lisp/frugal-uuid.nix @@ -0,0 +1,40 @@ +{ pkgs, depot, ... }: + +let + inherit (depot.nix) buildLisp; + inherit (pkgs.sbcl.pkgs.frugal-uuid) src; + +in + +buildLisp.library { + name = "frugal-uuid"; + srcs = builtins.map (f: "${src}/${f}.lisp") [ + "package" + "frugal-uuid" + "frugal-uuid-node" + "frugal-uuid-clock" + "frugal-uuid-random" + "frugal-uuid-namespace" + "frugal-uuid-v1" + "frugal-uuid-v2" + "frugal-uuid-v3" + "frugal-uuid-v4" + "frugal-uuid-v5" + "frugal-uuid-v6" + "frugal-uuid-v7" + "frugal-uuid-v8" + ]; + + tests = { + name = "frugal-uuid-test"; + srcs = [ + "${src}/frugal-uuid-test.lisp" + ]; + deps = [ + depot.third_party.lisp.fiveam + ]; + expression = '' + (fiveam:run! :frugal-uuid) + ''; + }; +} diff --git a/third_party/lisp/global-vars.nix b/third_party/lisp/global-vars.nix index a3d27a09b..529816b00 100644 --- a/third_party/lisp/global-vars.nix +++ b/third_party/lisp/global-vars.nix @@ -1,6 +1,6 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.global-vars; +let src = with pkgs; srcOnly sbcl.pkgs.global-vars; in depot.nix.buildLisp.library { name = "global-vars"; srcs = [ "${src}/global-vars.lisp" ]; diff --git a/third_party/lisp/hunchentoot.nix b/third_party/lisp/hunchentoot.nix index e2480cd34..8b351fa9a 100644 --- a/third_party/lisp/hunchentoot.nix +++ b/third_party/lisp/hunchentoot.nix @@ -1,8 +1,8 @@ # Hunchentoot is a web framework for Common Lisp. -{ depot, pkgs, ... }: +{ depot, pkgs, lib, ... }: let - src = with pkgs; srcOnly lispPackages.hunchentoot; + src = with pkgs; srcOnly sbcl.pkgs.hunchentoot; url-rewrite = depot.nix.buildLisp.library { name = "url-rewrite"; @@ -36,10 +36,15 @@ depot.nix.buildLisp.library { ]; srcs = map (f: src + ("/" + f)) [ - "hunchentoot.asd" "packages.lisp" "compat.lisp" - "specials.lisp" + ] ++ [ + (pkgs.runCommand "specials.lisp" { } '' + substitute "${src}/specials.lisp" "$out" --replace-fail \ + ${lib.escapeShellArg "#.(asdf:component-version (asdf:find-system :hunchentoot))"} \ + '"${lib.removePrefix "v" src.version}"' + '') + ] ++ map (f: src + ("/" + f)) [ "conditions.lisp" "mime-types.lisp" "util.lisp" @@ -52,6 +57,7 @@ depot.nix.buildLisp.library { "headers.lisp" "set-timeouts.lisp" "taskmaster.lisp" + "ssl.lisp" "acceptor.lisp" "easy-handlers.lisp" ]; diff --git a/third_party/lisp/ironclad.nix b/third_party/lisp/ironclad.nix index 324c5da26..15f8e0ecb 100644 --- a/third_party/lisp/ironclad.nix +++ b/third_party/lisp/ironclad.nix @@ -3,7 +3,7 @@ let inherit (pkgs) runCommand; inherit (depot.nix.buildLisp) bundled; - src = with pkgs; srcOnly lispPackages.ironclad; + src = with pkgs; srcOnly sbcl.pkgs.ironclad; getSrc = f: "${src}/src/${f}"; in @@ -90,7 +90,17 @@ depot.nix.buildLisp.library { "digests/crc24.lisp" "digests/crc32.lisp" "digests/groestl.lisp" - "digests/jh.lisp" + ] ++ [ + { + # Work around compiler warning for CCL: + # https://github.com/sharplispers/ironclad/commit/ebc994b06409829c463b099fe460276cba564d43#commitcomment-153059140 + ccl = pkgs.runCommand "jh.lisp" { } '' + substitute "${src}/src/digests/jh.lisp" "$out" \ + --replace-fail "(declare (notinline jh-buffer jh-state))" "" + ''; + default = "${src}/src/digests/jh.lisp"; + } + ] ++ map getSrc [ "digests/kupyna.lisp" "digests/md2.lisp" "digests/md4.lisp" diff --git a/third_party/lisp/iterate.nix b/third_party/lisp/iterate.nix index b7d60265a..eef708c2c 100644 --- a/third_party/lisp/iterate.nix +++ b/third_party/lisp/iterate.nix @@ -2,7 +2,7 @@ # LOOP macro. { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.iterate; +let src = with pkgs; srcOnly sbcl.pkgs.iterate; in depot.nix.buildLisp.library { name = "iterate"; srcs = [ diff --git a/third_party/lisp/let-plus.nix b/third_party/lisp/let-plus.nix index bd7f31dfa..f9be858a2 100644 --- a/third_party/lisp/let-plus.nix +++ b/third_party/lisp/let-plus.nix @@ -1,6 +1,6 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.let-plus; +let src = with pkgs; srcOnly sbcl.pkgs.let-plus; in depot.nix.buildLisp.library { name = "let-plus"; deps = [ diff --git a/third_party/lisp/lisp-binary.nix b/third_party/lisp/lisp-binary.nix index 296112cc9..cc4dcbfa4 100644 --- a/third_party/lisp/lisp-binary.nix +++ b/third_party/lisp/lisp-binary.nix @@ -2,7 +2,7 @@ { depot, pkgs, ... }: let - src = pkgs.srcOnly pkgs.lispPackages.lisp-binary; + src = pkgs.srcOnly pkgs.sbcl.pkgs.lisp-binary; in depot.nix.buildLisp.library { name = "lisp-binary"; diff --git a/third_party/lisp/local-time.nix b/third_party/lisp/local-time.nix index 1358408d3..0d5d3a465 100644 --- a/third_party/lisp/local-time.nix +++ b/third_party/lisp/local-time.nix @@ -3,7 +3,7 @@ let inherit (depot.nix) buildLisp; - src = with pkgs; srcOnly lispPackages.local-time; + src = with pkgs; srcOnly sbcl.pkgs.local-time; in buildLisp.library { name = "local-time"; diff --git a/third_party/lisp/marshal.nix b/third_party/lisp/marshal.nix index 73a1664a0..b7232aff7 100644 --- a/third_party/lisp/marshal.nix +++ b/third_party/lisp/marshal.nix @@ -1,6 +1,6 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.marshal; +let src = with pkgs; srcOnly sbcl.pkgs.marshal; in depot.nix.buildLisp.library { name = "marshal"; srcs = map (f: src + ("/" + f)) [ diff --git a/third_party/lisp/md5.nix b/third_party/lisp/md5.nix index 8c3e255f1..218fffeb4 100644 --- a/third_party/lisp/md5.nix +++ b/third_party/lisp/md5.nix @@ -3,7 +3,7 @@ with depot.nix; -let src = with pkgs; srcOnly lispPackages.md5; +let src = with pkgs; srcOnly sbcl.pkgs.md5; in buildLisp.library { name = "md5"; deps = [ diff --git a/third_party/lisp/metabang-bind.nix b/third_party/lisp/metabang-bind.nix index fc046d089..b06acdad4 100644 --- a/third_party/lisp/metabang-bind.nix +++ b/third_party/lisp/metabang-bind.nix @@ -1,7 +1,7 @@ { depot, pkgs, ... }: let - getSrcs = builtins.map (p: "${pkgs.srcOnly pkgs.lispPackages.metabang-bind}/${p}"); + getSrcs = builtins.map (p: "${pkgs.srcOnly pkgs.sbcl.pkgs.metabang-bind}/${p}"); in depot.nix.buildLisp.library { diff --git a/third_party/lisp/moptilities.nix b/third_party/lisp/moptilities.nix index d38fbcb94..89766e0a8 100644 --- a/third_party/lisp/moptilities.nix +++ b/third_party/lisp/moptilities.nix @@ -1,7 +1,7 @@ # Compatibility layer for minor MOP implementation differences { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.moptilities; +let src = with pkgs; srcOnly sbcl.pkgs.moptilities; in depot.nix.buildLisp.library { name = "moptilities"; deps = [ depot.third_party.lisp.closer-mop ]; diff --git a/third_party/lisp/nibbles.nix b/third_party/lisp/nibbles.nix index b71f439c9..3136e9330 100644 --- a/third_party/lisp/nibbles.nix +++ b/third_party/lisp/nibbles.nix @@ -2,7 +2,19 @@ let inherit (depot.nix.buildLisp) bundled; - src = with pkgs; srcOnly lispPackages.nibbles; + src = with pkgs; srcOnly (sbcl.pkgs.nibbles.overrideAttrs (oldAttrs: { + patches = oldAttrs.patches or [ ] ++ [ + # Restoring the weird progn apparently fixes unbound MAKE-EA and EAX-OFFSET + # which we were seeing during macroexpansion. Curiously, building niblbes + # with ASDF is not affected by this problem. + (pkgs.fetchpatch { + name = "nibbles-sbcl-x86-restore-weird-progn.patch"; + url = "https://github.com/sharplispers/nibbles/commit/f37322b864ea12018bc0acbd70cb1e24bf0426eb.patch"; + revert = true; + sha256 = "0h601g145qscmvykrzrf9bnlakfh5qawwmdd1z8f2cslfxrkj9jc"; + }) + ]; + })); in depot.nix.buildLisp.library { name = "nibbles"; diff --git a/third_party/lisp/parse-float.nix b/third_party/lisp/parse-float.nix index e90824108..310313cfc 100644 --- a/third_party/lisp/parse-float.nix +++ b/third_party/lisp/parse-float.nix @@ -1,6 +1,6 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.parse-float; +let src = with pkgs; srcOnly sbcl.pkgs.parse-float; in depot.nix.buildLisp.library { name = "parse-float"; diff --git a/third_party/lisp/parse-number.nix b/third_party/lisp/parse-number.nix index 61b0b1fdd..a0c563fcf 100644 --- a/third_party/lisp/parse-number.nix +++ b/third_party/lisp/parse-number.nix @@ -1,6 +1,6 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.parse-number; +let src = with pkgs; srcOnly sbcl.pkgs.parse-number; in depot.nix.buildLisp.library { name = "parse-number"; srcs = map (f: src + ("/" + f)) [ diff --git a/third_party/lisp/parseq.nix b/third_party/lisp/parseq.nix index 23c67c2d9..081880af1 100644 --- a/third_party/lisp/parseq.nix +++ b/third_party/lisp/parseq.nix @@ -1,6 +1,6 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.parseq; +let src = with pkgs; srcOnly sbcl.pkgs.parseq; in depot.nix.buildLisp.library { name = "parseq"; diff --git a/third_party/lisp/physical-quantities.nix b/third_party/lisp/physical-quantities.nix index d594ff1a1..14b9aab02 100644 --- a/third_party/lisp/physical-quantities.nix +++ b/third_party/lisp/physical-quantities.nix @@ -1,6 +1,6 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.physical-quantities; +let src = with pkgs; srcOnly sbcl.pkgs.physical-quantities; in depot.nix.buildLisp.library { name = "physical-quantities"; diff --git a/third_party/lisp/postmodern.nix b/third_party/lisp/postmodern.nix index 25e0625c2..61b590e54 100644 --- a/third_party/lisp/postmodern.nix +++ b/third_party/lisp/postmodern.nix @@ -2,7 +2,7 @@ let inherit (depot.nix.buildLisp) bundled; - src = with pkgs; srcOnly lispPackages.postmodern; + src = with pkgs; srcOnly sbcl.pkgs.postmodern; cl-postgres = depot.nix.buildLisp.library { name = "cl-postgres"; diff --git a/third_party/lisp/prove.nix b/third_party/lisp/prove.nix index af4814992..21b32ee0e 100644 --- a/third_party/lisp/prove.nix +++ b/third_party/lisp/prove.nix @@ -1,6 +1,6 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.prove; +let src = with pkgs; srcOnly sbcl.pkgs.prove; in depot.nix.buildLisp.library { name = "prove"; diff --git a/third_party/lisp/puri.nix b/third_party/lisp/puri.nix index f7146ba93..d0b0d87e2 100644 --- a/third_party/lisp/puri.nix +++ b/third_party/lisp/puri.nix @@ -1,7 +1,7 @@ # Portable URI library { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.puri; +let src = with pkgs; srcOnly sbcl.pkgs.puri; in depot.nix.buildLisp.library { name = "puri"; srcs = [ diff --git a/third_party/lisp/rfc2388.nix b/third_party/lisp/rfc2388.nix index b82a490c9..8015f1326 100644 --- a/third_party/lisp/rfc2388.nix +++ b/third_party/lisp/rfc2388.nix @@ -1,7 +1,7 @@ # Implementation of RFC2388 (multipart/form-data) { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.rfc2388; +let src = with pkgs; srcOnly sbcl.pkgs.rfc2388; in depot.nix.buildLisp.library { name = "rfc2388"; diff --git a/third_party/lisp/s-sysdeps.nix b/third_party/lisp/s-sysdeps.nix index 9c4da4a02..48ea929ac 100644 --- a/third_party/lisp/s-sysdeps.nix +++ b/third_party/lisp/s-sysdeps.nix @@ -1,7 +1,7 @@ # A Common Lisp abstraction layer over platform dependent functionality. { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.s-sysdeps; +let src = with pkgs; srcOnly sbcl.pkgs.s-sysdeps; in depot.nix.buildLisp.library { name = "s-sysdeps"; diff --git a/third_party/lisp/s-xml/default.nix b/third_party/lisp/s-xml/default.nix index 486e1c1ac..4cb4abad2 100644 --- a/third_party/lisp/s-xml/default.nix +++ b/third_party/lisp/s-xml/default.nix @@ -4,7 +4,7 @@ let src = pkgs.applyPatches { name = "s-xml-source"; - src = pkgs.lispPackages.s-xml.src; + src = pkgs.sbcl.pkgs.s-xml.src; patches = [ ./0001-fix-definition-order-in-xml.lisp.patch diff --git a/third_party/lisp/split-sequence.nix b/third_party/lisp/split-sequence.nix index 4e8f723c3..1610c7220 100644 --- a/third_party/lisp/split-sequence.nix +++ b/third_party/lisp/split-sequence.nix @@ -1,7 +1,7 @@ # split-sequence is a library for, well, splitting sequences apparently. { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.split-sequence; +let src = with pkgs; srcOnly sbcl.pkgs.split-sequence; in depot.nix.buildLisp.library { name = "split-sequence"; srcs = map (f: src + ("/" + f)) [ diff --git a/third_party/lisp/str.nix b/third_party/lisp/str.nix index 556f9cc30..289117cca 100644 --- a/third_party/lisp/str.nix +++ b/third_party/lisp/str.nix @@ -2,7 +2,7 @@ let inherit (depot.nix) buildLisp; - src = with pkgs; srcOnly lispPackages.str; + src = with pkgs; srcOnly sbcl.pkgs.str; in buildLisp.library { name = "str"; @@ -22,7 +22,7 @@ buildLisp.library { substitute ${src}/str.lisp $out \ --replace-fail \ '(asdf:component-version (asdf:find-system "str"))' \ - '"${pkgs.lispPackages.str.meta.version}"' + '"${pkgs.sbcl.pkgs.str.version}"' '') ]; diff --git a/third_party/lisp/trivial-backtrace.nix b/third_party/lisp/trivial-backtrace.nix index 27949e8be..736c0db48 100644 --- a/third_party/lisp/trivial-backtrace.nix +++ b/third_party/lisp/trivial-backtrace.nix @@ -1,7 +1,7 @@ # Imported from http://common-lisp.net/project/trivial-backtrace/trivial-backtrace.git { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.trivial-backtrace; +let src = with pkgs; srcOnly sbcl.pkgs.trivial-backtrace; in depot.nix.buildLisp.library { name = "trivial-backtrace"; diff --git a/third_party/lisp/trivial-clock.nix b/third_party/lisp/trivial-clock.nix new file mode 100644 index 000000000..dc15eebc5 --- /dev/null +++ b/third_party/lisp/trivial-clock.nix @@ -0,0 +1,34 @@ +{ depot, pkgs, ... }: + +let + inherit (depot.nix) buildLisp; + src = pkgs.srcOnly pkgs.sbcl.pkgs.trivial-clock; +in + +buildLisp.library { + name = "trivial-clock"; + + srcs = [ + "${src}/trivial-clock.lisp" + ]; + deps = [ + depot.third_party.lisp.cffi + ]; + + tests = { + name = "trivial-clock-tests"; + deps = [ + depot.third_party.lisp.fiveam + ]; + srcs = [ + "${src}/trivial-clock-test.lisp" + ]; + expression = '' + (fiveam:run! :trivial-clock) + ''; + }; + + brokenOn = [ + "ecl" # dyn cffi + ]; +} diff --git a/third_party/lisp/trivial-features.nix b/third_party/lisp/trivial-features.nix index 02abac54a..79cb16d4b 100644 --- a/third_party/lisp/trivial-features.nix +++ b/third_party/lisp/trivial-features.nix @@ -1,6 +1,6 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.trivial-features; +let src = with pkgs; srcOnly sbcl.pkgs.trivial-features; in depot.nix.buildLisp.library { name = "trivial-features"; srcs = [ diff --git a/third_party/lisp/trivial-garbage.nix b/third_party/lisp/trivial-garbage.nix index 74224df60..b5b871a14 100644 --- a/third_party/lisp/trivial-garbage.nix +++ b/third_party/lisp/trivial-garbage.nix @@ -2,7 +2,7 @@ # hash-tables and weak pointers { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.trivial-garbage; +let src = with pkgs; srcOnly sbcl.pkgs.trivial-garbage; in depot.nix.buildLisp.library { name = "trivial-garbage"; srcs = [ (src + "/trivial-garbage.lisp") ]; diff --git a/third_party/lisp/trivial-gray-streams.nix b/third_party/lisp/trivial-gray-streams.nix index 62a30f1e9..ff91bc6da 100644 --- a/third_party/lisp/trivial-gray-streams.nix +++ b/third_party/lisp/trivial-gray-streams.nix @@ -1,7 +1,7 @@ # Portability library for CL gray streams. { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.trivial-gray-streams; +let src = with pkgs; srcOnly sbcl.pkgs.trivial-gray-streams; in depot.nix.buildLisp.library { name = "trivial-gray-streams"; srcs = [ diff --git a/third_party/lisp/trivial-indent.nix b/third_party/lisp/trivial-indent.nix index 70a6e19d4..61aa5a609 100644 --- a/third_party/lisp/trivial-indent.nix +++ b/third_party/lisp/trivial-indent.nix @@ -1,6 +1,6 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.trivial-indent; +let src = with pkgs; srcOnly sbcl.pkgs.trivial-indent; in depot.nix.buildLisp.library { name = "trivial-indent"; diff --git a/third_party/lisp/trivial-mimes.nix b/third_party/lisp/trivial-mimes.nix index b097a3d0e..16f6199f3 100644 --- a/third_party/lisp/trivial-mimes.nix +++ b/third_party/lisp/trivial-mimes.nix @@ -1,7 +1,7 @@ { depot, pkgs, ... }: let - src = with pkgs; srcOnly lispPackages.trivial-mimes; + src = with pkgs; srcOnly sbcl.pkgs.trivial-mimes; mime-types = pkgs.runCommand "mime-types.lisp" { } '' substitute ${src}/mime-types.lisp $out \ diff --git a/third_party/lisp/uax-15.nix b/third_party/lisp/uax-15.nix index f98c029d3..7773d29c3 100644 --- a/third_party/lisp/uax-15.nix +++ b/third_party/lisp/uax-15.nix @@ -3,7 +3,7 @@ let inherit (pkgs) runCommand; inherit (depot.nix.buildLisp) bundled; - src = with pkgs; srcOnly lispPackages.uax-15; + src = with pkgs; srcOnly sbcl.pkgs.uax-15; in depot.nix.buildLisp.library { name = "uax-15"; diff --git a/third_party/lisp/unix-opts.nix b/third_party/lisp/unix-opts.nix index 248296113..aa54b208f 100644 --- a/third_party/lisp/unix-opts.nix +++ b/third_party/lisp/unix-opts.nix @@ -2,7 +2,7 @@ { depot, pkgs, ... }: -let src = with pkgs; srcOnly lispPackages.unix-opts; +let src = with pkgs; srcOnly sbcl.pkgs.unix-opts; in depot.nix.buildLisp.library { name = "unix-opts"; diff --git a/third_party/lisp/usocket-server.nix b/third_party/lisp/usocket-server.nix index 5d6d04535..f83c974e5 100644 --- a/third_party/lisp/usocket-server.nix +++ b/third_party/lisp/usocket-server.nix @@ -3,7 +3,7 @@ let inherit (depot.nix) buildLisp; - src = with pkgs; srcOnly lispPackages.usocket-server; + src = with pkgs; srcOnly sbcl.pkgs.usocket-server; in buildLisp.library { name = "usocket-server"; diff --git a/third_party/lisp/usocket.nix b/third_party/lisp/usocket.nix index 589a3a0cf..5c8295326 100644 --- a/third_party/lisp/usocket.nix +++ b/third_party/lisp/usocket.nix @@ -3,7 +3,7 @@ let inherit (depot.nix) buildLisp; - src = with pkgs; srcOnly lispPackages.usocket; + src = with pkgs; srcOnly sbcl.pkgs.usocket; in buildLisp.library { name = "usocket"; diff --git a/third_party/nixpkgs/default.nix b/third_party/nixpkgs/default.nix index 7648a3210..1b3df346e 100644 --- a/third_party/nixpkgs/default.nix +++ b/third_party/nixpkgs/default.nix @@ -56,9 +56,6 @@ let # newer trunk fails somewhere within reqwest, trying to read a mystery file trunk = stableNixpkgs.trunk; - # the big lisp package change breaks everything in //3p/lisp, undo it for now. - lispPackages = stableNixpkgs.lispPackages; - # mypaint is broken on stable (2024-09-05) mypaint = stableNixpkgs.mypaint;