tvl-depot/users/sterni/clhs/default.nix
sterni 861c0f0c79 feat(sterni/clhs): add cli to lookup symbols in the CLHS
Probably very similar to M-x sly-hyperspec-lookup: take a list of
common lisp symbols on the command line open the corresponding pages
in a local copy of the hyperspec in $BROWSER. Optionally the paths can
be printed to stdout.

Change-Id: I389e254f14eb0fc8fd8b18a4dbfe7adeeda9ba72
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2397
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-01-17 13:17:28 +00:00

37 lines
829 B
Nix

{ pkgs, depot, ... }:
let
inherit (pkgs) fetchzip writeText;
inherit (depot.nix) buildLisp;
inherit (builtins) replaceStrings;
clhsVersion = "7-0";
clhs = fetchzip {
name = "HyperSpec-${replaceStrings [ "-" ] [ "." ] clhsVersion}";
url = "ftp://ftp.lispworks.com/pub/software_tools/reference/HyperSpec-${clhsVersion}.tar.gz";
sha256 = "1zsi35245m5sfb862ibzy0pzlph48wvlggnqanymhgqkpa1v20ak";
stripRoot = false;
};
clhs-path = writeText "clhs-path.lisp" ''
(in-package :clhs-lookup.clhs-path)
(defparameter *clhs-path* (pathname "${clhs}/"))
'';
clhs-lookup = buildLisp.program {
name = "clhs-lookup";
deps = [
(buildLisp.bundled "uiop")
];
srcs = [
./packages.lisp
clhs-path
./clhs-lookup.lisp
];
};
in {
inherit clhs clhs-lookup;
}