5bc73de59d
Accessing the headers of a MIME message feels like something mime4cl should handle. We implemented this ad hoc in mblog before in order to not need to worry about doing it in a sensible way. Now we introduce a decent-ish interface for getting a header from a MIME message, mime-message-header-values: * It returns a list because MIME message headers may appear multiple times. * It decodes RFC2047 only upon request, as you may want to be stricter about parsing certain fields. * It checks header name equality case insensitively. The code for decoding the RFC2047 string is retained and still uses babel for doing the actual decoding. Change-Id: I58bbbe4b46dbded04160b481a28a40d14775673d Reviewed-on: https://cl.tvl.fyi/c/depot/+/5150 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
44 lines
901 B
Nix
44 lines
901 B
Nix
{ depot, pkgs, ... }:
|
|
|
|
(depot.nix.buildLisp.program {
|
|
name = "mblog";
|
|
|
|
srcs = [
|
|
./packages.lisp
|
|
./maildir.lisp
|
|
./transformer.lisp
|
|
./note.lisp
|
|
./mblog.lisp
|
|
./cli.lisp
|
|
];
|
|
|
|
deps = [
|
|
{
|
|
sbcl = depot.nix.buildLisp.bundled "uiop";
|
|
default = depot.nix.buildLisp.bundled "asdf";
|
|
}
|
|
depot.lisp.klatre
|
|
depot.third_party.lisp.alexandria
|
|
depot.third_party.lisp.closure-html
|
|
depot.third_party.lisp.cl-date-time-parser
|
|
depot.third_party.lisp.cl-who
|
|
depot.third_party.lisp.local-time
|
|
depot.third_party.lisp.mime4cl
|
|
];
|
|
|
|
main = "cli:main";
|
|
|
|
# due to sclf
|
|
brokenOn = [
|
|
"ccl"
|
|
"ecl"
|
|
];
|
|
}).overrideAttrs (super: {
|
|
# The built binary dispatches based on argv[0]. Building two executables would
|
|
# waste a lot of space.
|
|
buildCommand = ''
|
|
${super.buildCommand}
|
|
|
|
ln -s "$out/bin/mblog" "$out/bin/mnote-html"
|
|
'';
|
|
})
|