2021-10-11 16:52:03 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "mdbook-katex";
|
|
|
|
version = "0.2.10";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lzanini";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-10-21 18:38:19 +00:00
|
|
|
hash = "sha256-5PzXX7icRxcHpzjp3x/9ssn2o0444uHrzBn1Ds1DEPM=";
|
2021-10-11 16:52:03 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
cargoPatches = [
|
|
|
|
# Remove when https://github.com/lzanini/mdbook-katex/pull/35 is in a new release.
|
|
|
|
./update-mdbook-for-rust-1.64.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
cargoHash = "sha256-lrEirKkGf9/8yLyLSON54UaeQ3Xtl7g7ezUc7e1KVHw=";
|
2021-10-11 16:52:03 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A preprocessor for mdbook, rendering LaTeX equations to HTML at build time.";
|
|
|
|
homepage = "https://github.com/lzanini/${pname}";
|
|
|
|
license = [ licenses.mit ];
|
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
|
|
|
};
|
|
|
|
}
|