From b0614b5c83ae62672cb036bebb6ce12675aa3074 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 15 Dec 2021 00:00:26 +0300 Subject: [PATCH] refactor(3p/lisp): Move things from //users/wpcarro/third_party/lisp * move packages and adapt them for the depot structure instead of briefcase * drop linear-programming package, it didn't build anyways Note that at least some of these packages (e.g. prove) are deprecated upstream, but lets sort that out later. Change-Id: I7f5a5faa29d57f060b21ac8e1706090866a82000 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4330 Autosubmit: tazjin Reviewed-by: grfn Reviewed-by: wpcarro Tested-by: BuildkiteCI --- .../lisp/cl-arrows.nix | 5 ++-- .../lisp/cl-colors.nix | 7 ++--- .../lisp/let-plus.nix | 7 ++--- .../lisp/prove.nix | 25 ++++++++++-------- users/wpcarro/third_party/README.md | 5 ---- users/wpcarro/third_party/default.nix | 5 ---- users/wpcarro/third_party/lisp/anaphora.nix | 17 ------------ .../third_party/lisp/linear-programming.nix | 26 ------------------- 8 files changed, 25 insertions(+), 72 deletions(-) rename {users/wpcarro/third_party => third_party}/lisp/cl-arrows.nix (68%) rename {users/wpcarro/third_party => third_party}/lisp/cl-colors.nix (69%) rename {users/wpcarro/third_party => third_party}/lisp/let-plus.nix (67%) rename {users/wpcarro/third_party => third_party}/lisp/prove.nix (77%) delete mode 100644 users/wpcarro/third_party/README.md delete mode 100644 users/wpcarro/third_party/default.nix delete mode 100644 users/wpcarro/third_party/lisp/anaphora.nix delete mode 100644 users/wpcarro/third_party/lisp/linear-programming.nix diff --git a/users/wpcarro/third_party/lisp/cl-arrows.nix b/third_party/lisp/cl-arrows.nix similarity index 68% rename from users/wpcarro/third_party/lisp/cl-arrows.nix rename to third_party/lisp/cl-arrows.nix index 4c09d688f..778adbf69 100644 --- a/users/wpcarro/third_party/lisp/cl-arrows.nix +++ b/third_party/lisp/cl-arrows.nix @@ -1,9 +1,10 @@ -{ depot, ... }: +{ depot, pkgs, ... }: let - src = builtins.fetchGit { + src = pkgs.fetchgit { url = "https://github.com/nightfly19/cl-arrows.git"; rev = "cbb46b69a7de40f1161c9caaf6cef93b3af9994f"; + hash = "sha256:0la2vr10510vmx29w9p3sj1qi1sych0crcpy4kdgxzn8m7kqlli0"; }; in depot.nix.buildLisp.library { name = "cl-arrows"; diff --git a/users/wpcarro/third_party/lisp/cl-colors.nix b/third_party/lisp/cl-colors.nix similarity index 69% rename from users/wpcarro/third_party/lisp/cl-colors.nix rename to third_party/lisp/cl-colors.nix index fa35b755d..71f78e424 100644 --- a/users/wpcarro/third_party/lisp/cl-colors.nix +++ b/third_party/lisp/cl-colors.nix @@ -1,15 +1,16 @@ -{ depot, briefcase, ... }: +{ depot, pkgs, ... }: let - src = builtins.fetchGit { + src = pkgs.fetchgit { url = "https://github.com/tpapp/cl-colors.git"; rev = "827410584553f5c717eec6182343b7605f707f75"; + hash = "sha256:0l446lday4hybsm9bq3jli97fvv8jb1d33abg79vbylpwjmf3y9a"; }; in depot.nix.buildLisp.library { name = "cl-colors"; deps = [ depot.third_party.lisp.alexandria - briefcase.third_party.lisp.let-plus + depot.third_party.lisp.let-plus ]; srcs = [ "${src}/package.lisp" diff --git a/users/wpcarro/third_party/lisp/let-plus.nix b/third_party/lisp/let-plus.nix similarity index 67% rename from users/wpcarro/third_party/lisp/let-plus.nix rename to third_party/lisp/let-plus.nix index a750443fd..3afb640e4 100644 --- a/users/wpcarro/third_party/lisp/let-plus.nix +++ b/third_party/lisp/let-plus.nix @@ -1,15 +1,16 @@ -{ depot, briefcase, ... }: +{ depot, pkgs, ... }: let - src = builtins.fetchGit { + src = pkgs.fetchgit { url = "https://github.com/tpapp/let-plus.git"; rev = "7cf18b29ed0fe9c667a9a6a101b08ab9661a59e9"; + hash = "sha256:1xy3b05dwjddk33mah2jaigm4jzsmrxjcc1d0dhsw0krwgr4450f"; }; in depot.nix.buildLisp.library { name = "let-plus"; deps = [ depot.third_party.lisp.alexandria - briefcase.third_party.lisp.anaphora + depot.third_party.lisp.anaphora ]; srcs = [ "${src}/package.lisp" diff --git a/users/wpcarro/third_party/lisp/prove.nix b/third_party/lisp/prove.nix similarity index 77% rename from users/wpcarro/third_party/lisp/prove.nix rename to third_party/lisp/prove.nix index 7c5879b1f..358049865 100644 --- a/users/wpcarro/third_party/lisp/prove.nix +++ b/third_party/lisp/prove.nix @@ -1,31 +1,34 @@ -{ depot, briefcase, ... }: +{ depot, pkgs, ... }: let - src = builtins.fetchGit { + src = pkgs.fetchgit { url = "https://github.com/fukamachi/prove.git"; rev = "5d71f02795b89e36f34e8c7d50e69b67ec6ca2de"; + hash = "sha256:0ca6ha3zhmckq3ad9lxm6sbg4i0hg3m81xhan4dkxd3x9898jzpc"; }; in depot.nix.buildLisp.library { name = "prove"; + deps = [ - depot.third_party.lisp.cl-ppcre - depot.third_party.lisp.cl-ansi-text depot.third_party.lisp.alexandria - depot.third_party.lisp.uiop - briefcase.third_party.lisp.cl-colors + depot.third_party.lisp.cl-ansi-text + depot.third_party.lisp.cl-colors + depot.third_party.lisp.cl-ppcre + (depot.nix.buildLisp.bundled "asdf") ]; + srcs = [ - "${src}/src/asdf.lisp" - "${src}/src/suite.lisp" "${src}/src/color.lisp" "${src}/src/output.lisp" - "${src}/src/prove.lisp" + "${src}/src/asdf.lisp" "${src}/src/report.lisp" "${src}/src/reporter.lisp" - "${src}/src/test.lisp" - "${src}/src/reporter/dot.lisp" "${src}/src/reporter/fiveam.lisp" "${src}/src/reporter/list.lisp" + "${src}/src/reporter/dot.lisp" "${src}/src/reporter/tap.lisp" + "${src}/src/suite.lisp" + "${src}/src/test.lisp" + "${src}/src/prove.lisp" ]; } diff --git a/users/wpcarro/third_party/README.md b/users/wpcarro/third_party/README.md deleted file mode 100644 index 29e498a37..000000000 --- a/users/wpcarro/third_party/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# third_party - -The `third_party` directory hosts Nix expressions that package software that I -cannot or have not found in other Nix package repositorys like `nixpkgs` or -`depot`. diff --git a/users/wpcarro/third_party/default.nix b/users/wpcarro/third_party/default.nix deleted file mode 100644 index 949110373..000000000 --- a/users/wpcarro/third_party/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ pkgs, briefcase, depot, ... }: - -# Exposing these to be available as briefcase.third_party.pkgs for example. - -{ inherit pkgs briefcase depot; } diff --git a/users/wpcarro/third_party/lisp/anaphora.nix b/users/wpcarro/third_party/lisp/anaphora.nix deleted file mode 100644 index bf4bf663f..000000000 --- a/users/wpcarro/third_party/lisp/anaphora.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ depot, ... }: - -let - src = builtins.fetchGit { - url = "https://github.com/tokenrove/anaphora.git"; - rev = "aeace4c68cf55098a67112750b28f8f2dc6d0e30"; - }; -in depot.nix.buildLisp.library { - name = "anaphora"; - deps = []; - srcs = [ - "${src}/packages.lisp" - "${src}/early.lisp" - "${src}/symbolic.lisp" - "${src}/anaphora.lisp" - ]; -} diff --git a/users/wpcarro/third_party/lisp/linear-programming.nix b/users/wpcarro/third_party/lisp/linear-programming.nix deleted file mode 100644 index fc95787a1..000000000 --- a/users/wpcarro/third_party/lisp/linear-programming.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ depot, ... }: - -let - src = builtins.fetchGit { - url = "https://github.com/neil-lindquist/linear-programming.git"; - rev = "8c8d55e7584773b90c4ba4b225c5f2008f4c474a"; - }; -in depot.nix.buildLisp.library { - name = "linear-programming"; - deps = [ - (depot.nix.buildLisp.bundled "uiop") - depot.third_party.lisp.iterate - depot.third_party.lisp.alexandria - ]; - srcs = [ - "${src}/src/conditions.lisp" - "${src}/src/expressions.lisp" - "${src}/src/simplex.lisp" - "${src}/src/system-info.lisp" - "${src}/src/utils.lisp" - "${src}/src/problem.lisp" - "${src}/src/solver.lisp" - "${src}/src/external-formats.lisp" - "${src}/src/all.lisp" - ]; -}