tvl-depot/third_party/lisp/cl-json.nix
sterni 049ec22943 feat(nix/buildLisp): re-enable CCL
The problem went away once again, let's see how long it'll last this time.

As it turns out, CCL has a Unicode Standard conforming string
implementation that doesn't allow the use of (lone) surrogate code
points, requiring us to disable a test in cl-json which tested the
behavior of en- and decoding of such a (technically illegal) string.

Change-Id: I8bfa482934bbf94f86cecdde02d5c3d4e77950a5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6204
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
2022-08-30 17:51:35 +00:00

53 lines
1.2 KiB
Nix

# JSON encoder & decoder
{ depot, pkgs, ... }:
let
inherit (depot.nix) buildLisp;
# https://github.com/sharplispers/cl-json/pull/12/
src = pkgs.fetchFromGitHub {
owner = "sternenseemann";
repo = "cl-json";
rev = "c059bec94e28a11102a994d6949e2e52764f21fd";
sha256 = "0l07syw1b1x2zi8kj4iph3rf6vi6c16b7fk69iv7x27wrdsr1qwj";
};
getSrcs = subdir: map (f: src + ("/" + subdir + "/" + f));
in
buildLisp.library {
name = "cl-json";
deps = [ (buildLisp.bundled "asdf") ];
srcs = [ "${src}/cl-json.asd" ] ++
(getSrcs "src" [
"package.lisp"
"common.lisp"
"objects.lisp"
"camel-case.lisp"
"decoder.lisp"
"encoder.lisp"
"utils.lisp"
"json-rpc.lisp"
]);
tests = {
deps = [
depot.third_party.lisp.cl-unicode
depot.third_party.lisp.fiveam
];
srcs = [
# CLOS tests are broken upstream as well
# https://github.com/sharplispers/cl-json/issues/11
(pkgs.writeText "no-clos-tests.lisp" ''
(replace *features* (delete :cl-json-clos *features*))
'')
] ++ getSrcs "t" [
"package.lisp"
"testencoder.lisp"
"testdecoder.lisp"
"testmisc.lisp"
];
expression = "(fiveam:run! 'json-test::json)";
};
}