blob: 8dbb1567acb363e43598281c5dbbe79653aabbb6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# 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 = "479685029c511cb2011f2f2a99ca6c63aa2e4865";
sha256 = "1663xlzb0wj6kd0wy2cmhafrwip7vy0wlfckc519aj9j18aak5ja";
};
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)";
};
}
|