about summary refs log tree commit diff
path: root/third_party
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-07-22T20·28-0400
committerglittershark <grfn@gws.fyi>2020-07-23T04·28+0000
commitb1c0866037ea63b670055883de88a9fe4e8891e2 (patch)
treecef4735ba4745239d511cb6885cb538526f17471 /third_party
parentf591c32dfb2a9f0246c8d6501c1efab4c80da52f (diff)
feat(3p/lisp): Add LASS r/1423
Add LASS, a CSS library

Change-Id: I225959b12210895d0e5baf8a41ac09b0351f0aed
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1349
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'third_party')
-rw-r--r--third_party/lisp/lass.nix34
-rw-r--r--third_party/lisp/parse-float.nix22
-rw-r--r--third_party/lisp/parseq.nix20
-rw-r--r--third_party/lisp/physical-quantities.nix30
-rw-r--r--third_party/lisp/trivial-indent.nix17
-rw-r--r--third_party/lisp/trivial-mimes.nix24
6 files changed, 147 insertions, 0 deletions
diff --git a/third_party/lisp/lass.nix b/third_party/lisp/lass.nix
new file mode 100644
index 0000000000..457e25c7e5
--- /dev/null
+++ b/third_party/lisp/lass.nix
@@ -0,0 +1,34 @@
+{ depot, pkgs, ... }:
+
+let
+  src = pkgs.fetchFromGitHub {
+    owner = "Shinmera";
+    repo = "LASS";
+    rev = "f51b9e941ee0a2a1f76ba814dcef22f9fb5f69bf";
+    sha256 = "11mxzyx34ynsfsrs8pgrarqi9s442vkpmh7kdpzvarhj7i97g8yx";
+  };
+
+in depot.nix.buildLisp.library {
+  name = "lass";
+
+  deps = with depot.third_party.lisp; [
+    trivial-indent
+    trivial-mimes
+    physical-quantities
+    parse-float
+    cl-base64
+    (depot.nix.buildLisp.bundled "asdf")
+  ];
+
+  srcs = map (f: src + ("/" + f)) [
+    "package.lisp"
+    "readable-list.lisp"
+    "compiler.lisp"
+    "property-funcs.lisp"
+    "writer.lisp"
+    "lass.lisp"
+    "special.lisp"
+    "units.lisp"
+    "asdf.lisp"
+  ];
+}
diff --git a/third_party/lisp/parse-float.nix b/third_party/lisp/parse-float.nix
new file mode 100644
index 0000000000..4e36e69c7d
--- /dev/null
+++ b/third_party/lisp/parse-float.nix
@@ -0,0 +1,22 @@
+{ depot, pkgs, ... }:
+
+let
+  src = pkgs.fetchFromGitHub {
+    owner = "soemraws";
+    repo = "parse-float";
+    rev = "3074765101e41222b6b624a66aaf1e6416379f9c";
+    sha256 = "0jd2spawc3v8vzqf8ky4cngl45jm65fhkrdf20mf6dcbn3mzpkmr";
+  };
+
+in depot.nix.buildLisp.library {
+  name = "parse-float";
+
+  deps = with depot.third_party.lisp; [
+    alexandria
+  ];
+
+  srcs = map (f: src + ("/" + f)) [
+    "package.lisp"
+    "parse-float.lisp"
+  ];
+}
diff --git a/third_party/lisp/parseq.nix b/third_party/lisp/parseq.nix
new file mode 100644
index 0000000000..fe045d5299
--- /dev/null
+++ b/third_party/lisp/parseq.nix
@@ -0,0 +1,20 @@
+{ depot, pkgs, ... }:
+
+let
+  src = pkgs.fetchFromGitHub {
+    owner = "mrossini-ethz";
+    repo = "parseq";
+    rev = "5cd95b324b68255d89f27f8065f4c29674558b26";
+    sha256 = "1f3vvxgyiv0xn2hzafhh63l3gnvn2vaxr5pi3ld7d340mka2ndg0";
+  };
+
+in depot.nix.buildLisp.library {
+  name = "parseq";
+
+  srcs = map (f: src + ("/" + f)) [
+    "package.lisp"
+    "conditions.lisp"
+    "utils.lisp"
+    "defrule.lisp"
+  ];
+}
diff --git a/third_party/lisp/physical-quantities.nix b/third_party/lisp/physical-quantities.nix
new file mode 100644
index 0000000000..6e124a9132
--- /dev/null
+++ b/third_party/lisp/physical-quantities.nix
@@ -0,0 +1,30 @@
+{ depot, pkgs, ... }:
+
+let
+  src = pkgs.fetchFromGitHub {
+    owner = "mrossini-ethz";
+    repo = "physical-quantities";
+    rev = "8feb66ef3293fcb9ff4c4bd3ee872bfc385a590e";
+    sha256 = "1qznv0hmn2n7g9dxx1iw0qpr0pf2lnbahn0x0b3v50xzcb65kgig";
+  };
+in depot.nix.buildLisp.library {
+  name = "physical-quantities";
+
+  deps = with depot.third_party.lisp; [
+    parseq
+  ];
+
+  srcs = map (f: src + ("/" + f)) [
+    "package.lisp"
+    "utils.lisp"
+    "conditions.lisp"
+    "unit-factor.lisp"
+    "unit-database.lisp"
+    "units.lisp"
+    "quantity.lisp"
+    "numeric.lisp"
+    "parse-rules.lisp"
+    "read-macro.lisp"
+    "si-units.lisp"
+  ];
+}
diff --git a/third_party/lisp/trivial-indent.nix b/third_party/lisp/trivial-indent.nix
new file mode 100644
index 0000000000..65d98604d7
--- /dev/null
+++ b/third_party/lisp/trivial-indent.nix
@@ -0,0 +1,17 @@
+
+{ depot, pkgs, ... }:
+
+let
+  src = pkgs.fetchFromGitHub {
+    owner = "Shinmera";
+    repo = "trivial-indent";
+    rev = "2d016941751647c6cc5bd471751c2cf68861c94a";
+    sha256 = "1sj90nqz17w4jq0ixz00gb9g5g6d2s7l8r17zdby27gxxh51w266";
+  };
+in depot.nix.buildLisp.library {
+  name = "trivial-indent";
+
+  srcs = map (f: src + ("/" + f)) [
+    "indent.lisp"
+  ];
+}
diff --git a/third_party/lisp/trivial-mimes.nix b/third_party/lisp/trivial-mimes.nix
new file mode 100644
index 0000000000..c4b21045c5
--- /dev/null
+++ b/third_party/lisp/trivial-mimes.nix
@@ -0,0 +1,24 @@
+{ depot, pkgs, ... }:
+
+let
+  src = pkgs.fetchFromGitHub {
+    owner = "Shinmera";
+    repo = "trivial-mimes";
+    rev = "a741fc2f567a4f86b853fd4677d75e62c03e51d9";
+    sha256 = "00kcm17q5plpzdj1qwg83ldhxksilgpcdkf3m9azxcdr968xs9di";
+  };
+
+  mime-types = pkgs.runCommand "mime-types.lisp" {} ''
+    substitute ${src}/mime-types.lisp $out \
+      --replace /etc/mime.types ${src}/mime.types
+  '';
+
+in depot.nix.buildLisp.library {
+  name = "trivial-mimes";
+
+  deps = [
+    (depot.nix.buildLisp.bundled "uiop")
+  ];
+
+  srcs = [ mime-types ];
+}