From a41b8c70a68b3b6d848d708cd8058866b23847e6 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 26 Jan 2020 23:59:07 +0000 Subject: refactor(third_party/lisp): Use buildLisp.bundled for built-in libs Deprecates derivations for: * sb-bsd-sockets * sb-posix * sb-rotate-byte * uiop --- third_party/lisp/asdf-flv/default.nix | 5 +++-- third_party/lisp/asdf.nix | 9 --------- third_party/lisp/cffi.nix | 7 ++++--- third_party/lisp/chipz.nix | 6 ++++-- third_party/lisp/cl-fad.nix | 6 ++++-- third_party/lisp/cl-json.nix | 5 +++-- third_party/lisp/cl-plus-ssl.nix | 8 +++++--- third_party/lisp/drakma.nix | 6 ++++-- third_party/lisp/md5.nix | 10 ++++------ third_party/lisp/sb-bsd-sockets.nix | 10 ---------- third_party/lisp/sb-posix.nix | 10 ---------- third_party/lisp/sb-rotate-byte.nix | 10 ---------- third_party/lisp/uiop.nix | 10 ---------- third_party/lisp/usocket.nix | 8 +++++--- 14 files changed, 36 insertions(+), 74 deletions(-) delete mode 100644 third_party/lisp/asdf.nix delete mode 100644 third_party/lisp/sb-bsd-sockets.nix delete mode 100644 third_party/lisp/sb-posix.nix delete mode 100644 third_party/lisp/sb-rotate-byte.nix delete mode 100644 third_party/lisp/uiop.nix (limited to 'third_party') diff --git a/third_party/lisp/asdf-flv/default.nix b/third_party/lisp/asdf-flv/default.nix index 3e8843ef4d..9a170700f8 100644 --- a/third_party/lisp/asdf-flv/default.nix +++ b/third_party/lisp/asdf-flv/default.nix @@ -1,9 +1,10 @@ # Imported from https://github.com/didierverna/asdf-flv { pkgs, ... }: -pkgs.nix.buildLisp.library { +with pkgs.nix; +buildLisp.library { name = "asdf-flv"; - deps = with pkgs.third_party.lisp; [ asdf ]; + deps = [ (buildLisp.bundled "asdf") ]; srcs = [ ./package.lisp diff --git a/third_party/lisp/asdf.nix b/third_party/lisp/asdf.nix deleted file mode 100644 index 3d41a1f36d..0000000000 --- a/third_party/lisp/asdf.nix +++ /dev/null @@ -1,9 +0,0 @@ -# ASDF ships with SBCL. This package just exists to force it to load. -{ pkgs, ... }: - -with pkgs; - -nix.buildLisp.library { - name = "asdf"; - srcs = lib.singleton (builtins.toFile "asdf.lisp" "(require 'asdf)"); -} diff --git a/third_party/lisp/cffi.nix b/third_party/lisp/cffi.nix index 556dee0676..a01dab8924 100644 --- a/third_party/lisp/cffi.nix +++ b/third_party/lisp/cffi.nix @@ -1,18 +1,19 @@ # CFFI purports to be the Common Foreign Function Interface. { pkgs, ... }: +with pkgs.nix; let src = builtins.fetchGit { url = "https://github.com/cffi/cffi.git"; rev = "5e838bf46d0089c43ebd3ea014a207c403e29c61"; }; -in pkgs.nix.buildLisp.library { +in buildLisp.library { name = "cffi"; deps = with pkgs.third_party.lisp; [ alexandria - asdf babel trivial-features - uiop + (buildLisp.bundled "asdf") + (buildLisp.bundled "uiop") ]; srcs = map (f: src + ("/src/" + f)) [ diff --git a/third_party/lisp/chipz.nix b/third_party/lisp/chipz.nix index 5a8c39dc05..8f29792bc1 100644 --- a/third_party/lisp/chipz.nix +++ b/third_party/lisp/chipz.nix @@ -1,15 +1,17 @@ # Common Lisp library for decompressing deflate, zlib, gzip, and bzip2 data { pkgs, ... }: +with pkgs.nix; + let src = pkgs.third_party.fetchFromGitHub { owner = "froydnj"; repo = "chipz"; rev = "75dfbc660a5a28161c57f115adf74c8a926bfc4d"; sha256 = "0plx4rs39zbs4gjk77h4a2q11zpy75fh9v8hnxrvsf8fnakajhwg"; }; -in pkgs.nix.buildLisp.library { +in buildLisp.library { name = "chipz"; - deps = with pkgs.third_party.lisp; [ asdf ]; + deps = [ (buildLisp.bundled "asdf") ]; srcs = map (f: src + ("/" + f)) [ "chipz.asd" diff --git a/third_party/lisp/cl-fad.nix b/third_party/lisp/cl-fad.nix index 474e4b6963..194ecd3956 100644 --- a/third_party/lisp/cl-fad.nix +++ b/third_party/lisp/cl-fad.nix @@ -1,19 +1,21 @@ # Portable pathname library { pkgs, ...}: +with pkgs.nix; + let src = pkgs.third_party.fetchFromGitHub { owner = "edicl"; repo = "cl-fad"; rev = "c13d81c4bd9ba3a172631fd05dd213ab90e7d4cb"; sha256 = "1gc8i82v6gks7g0lnm54r4prk2mklidv2flm5fvbr0a7rsys0vpa"; }; -in pkgs.nix.buildLisp.library { +in buildLisp.library { name = "cl-fad"; deps = with pkgs.third_party.lisp; [ alexandria bordeaux-threads - sb-posix + (buildLisp.bundled "sb-posix") ]; srcs = map (f: src + ("/" + f)) [ diff --git a/third_party/lisp/cl-json.nix b/third_party/lisp/cl-json.nix index 0c77718ef0..b0362ff313 100644 --- a/third_party/lisp/cl-json.nix +++ b/third_party/lisp/cl-json.nix @@ -1,15 +1,16 @@ # JSON encoder & decoder { pkgs, ... }: +with pkgs.nix; let src = pkgs.third_party.fetchFromGitHub { owner = "hankhero"; repo = "cl-json"; rev = "6dfebb9540bfc3cc33582d0c03c9ec27cb913e79"; sha256 = "0fx3m3x3s5ji950yzpazz4s0img3l6b3d6l3jrfjv0lr702496lh"; }; -in pkgs.nix.buildLisp.library { +in buildLisp.library { name = "cl-json"; - deps = [ pkgs.third_party.lisp.asdf ]; + deps = [ (buildLisp.bundled "asdf") ]; srcs = [ "${src}/cl-json.asd" ] ++ (map (f: src + ("/src/" + f)) [ diff --git a/third_party/lisp/cl-plus-ssl.nix b/third_party/lisp/cl-plus-ssl.nix index 1945d8a2e9..1e725ba00a 100644 --- a/third_party/lisp/cl-plus-ssl.nix +++ b/third_party/lisp/cl-plus-ssl.nix @@ -1,22 +1,24 @@ # Common Lisp bindings to OpenSSL { pkgs, ... }: +with pkgs.nix; + let src = builtins.fetchGit { url = "https://github.com/cl-plus-ssl/cl-plus-ssl.git"; rev = "29081992f6d7b4e3aa2c5eeece4cd92b745071f4"; }; -in pkgs.nix.buildLisp.library { +in buildLisp.library { name = "cl-plus-ssl"; deps = with pkgs.third_party.lisp; [ alexandria bordeaux-threads cffi flexi-streams - sb-posix trivial-features trivial-garbage trivial-gray-streams - uiop + (buildLisp.bundled "uiop") + (buildLisp.bundled "sb-posix") ]; native = [ pkgs.third_party.openssl ]; diff --git a/third_party/lisp/drakma.nix b/third_party/lisp/drakma.nix index ac2d257a49..aac85909d1 100644 --- a/third_party/lisp/drakma.nix +++ b/third_party/lisp/drakma.nix @@ -1,16 +1,17 @@ # Drakma is an HTTP client for Common Lisp. { pkgs, ... }: +with pkgs.nix; + let src = pkgs.third_party.fetchFromGitHub { owner = "edicl"; repo = "drakma"; rev = "87feb02bef00b11a753d5fb21a5fec526b0d0bbb"; sha256 = "01b80am2vrw94xmdj7f21qm7p5ys08mmpzv4nc4icql81hqr1w2m"; }; -in pkgs.nix.buildLisp.library { +in buildLisp.library { name = "drakma"; deps = with pkgs.third_party.lisp; [ - asdf chipz chunga cl-base64 @@ -19,6 +20,7 @@ in pkgs.nix.buildLisp.library { flexi-streams puri usocket + (buildLisp.bundled "asdf") ]; srcs = map (f: src + ("/" + f)) [ diff --git a/third_party/lisp/md5.nix b/third_party/lisp/md5.nix index 3787e23175..229b61709d 100644 --- a/third_party/lisp/md5.nix +++ b/third_party/lisp/md5.nix @@ -1,18 +1,16 @@ # MD5 hash implementation { pkgs, ... }: +with pkgs.nix; + let src = pkgs.third_party.fetchFromGitHub { owner = "pmai"; repo = "md5"; rev = "b1412600f60d526ee34a7ba1596ec483da7894ab"; sha256 = "0lzip6b6xg7gd70xl1xmqp24fvxqj6ywjnz9lmx7988zpj20nhl2"; }; -in pkgs.nix.buildLisp.library { +in buildLisp.library { name = "md5"; - - deps = with pkgs.third_party.lisp; [ - sb-rotate-byte - ]; - + deps = [ (buildLisp.bundled "sb-rotate-byte") ]; srcs = [ (src + "/md5.lisp") ]; } diff --git a/third_party/lisp/sb-bsd-sockets.nix b/third_party/lisp/sb-bsd-sockets.nix deleted file mode 100644 index d311f8590f..0000000000 --- a/third_party/lisp/sb-bsd-sockets.nix +++ /dev/null @@ -1,10 +0,0 @@ -# SB-BSD-SOCKETS is an SBCL component. This package just forces it to -# be loaded. -{ pkgs, ... }: - -with pkgs; - -nix.buildLisp.library { - name = "sb-bsd-sockets"; - srcs = lib.singleton (builtins.toFile "sb-bsd-sockets.lisp" "(require 'sb-bsd-sockets)"); -} diff --git a/third_party/lisp/sb-posix.nix b/third_party/lisp/sb-posix.nix deleted file mode 100644 index 5fc65d3f59..0000000000 --- a/third_party/lisp/sb-posix.nix +++ /dev/null @@ -1,10 +0,0 @@ -# SB-POSIX is an SBCL component. This package just forces it to be -# loaded. -{ pkgs, ... }: - -with pkgs; - -nix.buildLisp.library { - name = "sb-posix"; - srcs = lib.singleton (builtins.toFile "sb-posix.lisp" "(require 'sb-posix)"); -} diff --git a/third_party/lisp/sb-rotate-byte.nix b/third_party/lisp/sb-rotate-byte.nix deleted file mode 100644 index 38e2397b4d..0000000000 --- a/third_party/lisp/sb-rotate-byte.nix +++ /dev/null @@ -1,10 +0,0 @@ -# SB-ROTATE-BYTE is an SBCL component. This package just forces it to -# be loaded. -{ pkgs, ... }: - -with pkgs; - -nix.buildLisp.library { - name = "sb-rotate-byte"; - srcs = lib.singleton (builtins.toFile "sb-rotate-byte.lisp" "(require 'sb-rotate-byte)"); -} diff --git a/third_party/lisp/uiop.nix b/third_party/lisp/uiop.nix deleted file mode 100644 index 1a63041be6..0000000000 --- a/third_party/lisp/uiop.nix +++ /dev/null @@ -1,10 +0,0 @@ -# UIOP ships with SBCL (due to ASDF). This package just exists to -# force it to load. -{ pkgs, ... }: - -with pkgs; - -nix.buildLisp.library { - name = "uiop"; - srcs = lib.singleton (builtins.toFile "uiop.lisp" "(require 'uiop)"); -} diff --git a/third_party/lisp/usocket.nix b/third_party/lisp/usocket.nix index 16f2003a33..0f40ab64aa 100644 --- a/third_party/lisp/usocket.nix +++ b/third_party/lisp/usocket.nix @@ -1,17 +1,19 @@ # Usocket is a portable socket library { pkgs, ... }: +with pkgs.nix; + let src = pkgs.third_party.fetchFromGitHub { owner = "usocket"; repo = "usocket"; rev = "fdf4fd1e0051ce83340ccfbbc8a43a462bb19cf2"; sha256 = "0x746wr2324l6bn7skqzgkzcbj5kd0zp2ck0c8rldrw0rzabg826"; }; -in pkgs.nix.buildLisp.library { +in buildLisp.library { name = "usocket"; deps = with pkgs.third_party.lisp; [ - asdf - sb-bsd-sockets + (buildLisp.bundled "asdf") + (buildLisp.bundled "sb-bsd-sockets") split-sequence ]; -- cgit 1.4.1