diff options
author | Vincent Ambo <mail@tazj.in> | 2021-12-14T21·32+0300 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2021-12-15T10·34+0000 |
commit | e9bfa84aafc65896e2fffead2f1ef4853bdd59af (patch) | |
tree | 711bd7c6aa289a7175c635c8866e75c85287ab45 /third_party/lisp/uax-15.nix | |
parent | b0614b5c83ae62672cb036bebb6ce12675aa3074 (diff) |
refactor(3p/lisp): Use sources from nixpkgs where possible r/3246
nixpkgs includes a lispPackages set which is generated from something. In the meantime, we pretty much never update our Lisp deps. This commit ties our sources to nixpkgs.lispPackages where the desired package is included in nixpkgs (which is actually most of them!) Change-Id: I520a006535980271b2fa4e0ed4e34029475dcbef Reviewed-on: https://cl.tvl.fyi/c/depot/+/4331 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'third_party/lisp/uax-15.nix')
-rw-r--r-- | third_party/lisp/uax-15.nix | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/third_party/lisp/uax-15.nix b/third_party/lisp/uax-15.nix index a13e5c1690d3..1e44f88d5cb7 100644 --- a/third_party/lisp/uax-15.nix +++ b/third_party/lisp/uax-15.nix @@ -3,16 +3,7 @@ let inherit (pkgs) runCommand; inherit (depot.nix.buildLisp) bundled; - - src = pkgs.fetchFromGitHub { - owner = "sabracrolleton"; - repo = "uax-15"; - rev = "a62fc7253663fac6467fc6b6bb69a73a0e8dfaa0"; - sha256 = "028kc3yfi29qjxs2nyr7dbrr2rcrr8lwpvbxvrq3g8bcwamc4jz4"; - }; - - # src = ../../../uax-15; - + src = with pkgs; srcOnly lispPackages.uax-15; in depot.nix.buildLisp.library { name = "uax-15"; @@ -23,22 +14,28 @@ in depot.nix.buildLisp.library { ]; srcs = [ - "${src}/uax-15.asd" "${src}/src/package.lisp" "${src}/src/utilities.lisp" "${src}/src/trivial-utf-16.lisp" + + # uax-15 has runtime data files that need to have their references + # replaced with store paths. + # + # additionally there are some wonky variable usages of variables + # that are never defined, for which we patch in defvar statements. (runCommand "precomputed-tables.lisp" {} '' substitute ${src}/src/precomputed-tables.lisp precomputed-tables.lisp \ --replace "(asdf:system-source-directory (asdf:find-system 'uax-15 nil))" \ '"${src}/"' sed -i precomputed-tables.lisp \ - -e '17i(defvar *canonical-decomp-map*)' \ - -e '17i(defvar *compatible-decomp-map*)' \ - -e '17i(defvar *canonical-combining-class*)' + -e '10i(defvar *canonical-decomp-map*)' \ + -e '10i(defvar *compatible-decomp-map*)' \ + -e '10i(defvar *canonical-combining-class*)' cp precomputed-tables.lisp $out '') + "${src}/src/normalize-backend.lisp" "${src}/src/uax-15.lisp" ]; |