From b1c0866037ea63b670055883de88a9fe4e8891e2 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Wed, 22 Jul 2020 16:28:34 -0400 Subject: feat(3p/lisp): Add LASS Add LASS, a CSS library Change-Id: I225959b12210895d0e5baf8a41ac09b0351f0aed Reviewed-on: https://cl.tvl.fyi/c/depot/+/1349 Tested-by: BuildkiteCI Reviewed-by: tazjin --- third_party/lisp/lass.nix | 34 ++++++++++++++++++++++++++++++++ third_party/lisp/parse-float.nix | 22 +++++++++++++++++++++ third_party/lisp/parseq.nix | 20 +++++++++++++++++++ third_party/lisp/physical-quantities.nix | 30 ++++++++++++++++++++++++++++ third_party/lisp/trivial-indent.nix | 17 ++++++++++++++++ third_party/lisp/trivial-mimes.nix | 24 ++++++++++++++++++++++ 6 files changed, 147 insertions(+) create mode 100644 third_party/lisp/lass.nix create mode 100644 third_party/lisp/parse-float.nix create mode 100644 third_party/lisp/parseq.nix create mode 100644 third_party/lisp/physical-quantities.nix create mode 100644 third_party/lisp/trivial-indent.nix create mode 100644 third_party/lisp/trivial-mimes.nix (limited to 'third_party') 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 ]; +} -- cgit 1.4.1