Reimplement the MIME body extraction and HTML rewriting from mblog in Rust so that shelling out to it becomes viable. The problem with mnote-html is mainly that it – being written in CL – requires a ~300MB executable and is a bit sluggish starting. Change-Id: I5c1adc1a7ab5f3dde207f9a1f67ace685bd3f69f Reviewed-on: https://cl.tvl.fyi/c/depot/+/13014 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: sterni <sternenseemann@systemli.org>
25 lines
460 B
Nix
25 lines
460 B
Nix
{ pkgs, lib, ... }:
|
|
|
|
pkgs.rustPlatform.buildRustPackage rec {
|
|
pname = "mn2hmtl";
|
|
version = "canon";
|
|
|
|
src = lib.fileset.toSource {
|
|
root = ./.;
|
|
fileset = lib.fileset.unions [
|
|
./Cargo.lock
|
|
./Cargo.toml
|
|
./mn2html.rs
|
|
];
|
|
};
|
|
|
|
cargoLock.lockFile = ./Cargo.lock;
|
|
|
|
passthru.shell = pkgs.mkShell {
|
|
name = "${pname}-shell";
|
|
nativeBuildInputs = [
|
|
pkgs.buildPackages.cargo
|
|
pkgs.buildPackages.rustc
|
|
];
|
|
};
|
|
}
|