diff options
Diffstat (limited to 'third_party/lisp/usocket.nix')
-rw-r--r-- | third_party/lisp/usocket.nix | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/third_party/lisp/usocket.nix b/third_party/lisp/usocket.nix index 920c41c58d..589a3a0cfc 100644 --- a/third_party/lisp/usocket.nix +++ b/third_party/lisp/usocket.nix @@ -1,19 +1,18 @@ # Usocket is a portable socket library -{ depot, ... }: +{ depot, pkgs, ... }: -with depot.nix; - -let src = depot.third_party.fetchFromGitHub { - owner = "usocket"; - repo = "usocket"; - rev = "fdf4fd1e0051ce83340ccfbbc8a43a462bb19cf2"; - sha256 = "0x746wr2324l6bn7skqzgkzcbj5kd0zp2ck0c8rldrw0rzabg826"; -}; -in buildLisp.library { +let + inherit (depot.nix) buildLisp; + src = with pkgs; srcOnly lispPackages.usocket; +in +buildLisp.library { name = "usocket"; deps = with depot.third_party.lisp; [ (buildLisp.bundled "asdf") - (buildLisp.bundled "sb-bsd-sockets") + { + ecl = buildLisp.bundled "sb-bsd-sockets"; + sbcl = buildLisp.bundled "sb-bsd-sockets"; + } split-sequence ]; @@ -32,6 +31,16 @@ in buildLisp.library { "package.lisp" "usocket.lisp" "condition.lisp" - "backend/sbcl.lisp" + ] ++ [ + { sbcl = "${src}/backend/sbcl.lisp"; } + + # ECL actually has two files, it supports the SBCL backend, + # but usocket also has some ECL specific code + { ecl = "${src}/backend/sbcl.lisp"; } + { ecl = "${src}/backend/ecl.lisp"; } + + # Same for CCL + { ccl = "${src}/backend/openmcl.lisp"; } + { ccl = "${src}/backend/clozure.lisp"; } ]); } |