depot/third_party/nixpkgs/pkgs/tools/text/mdbook-katex/default.nix
Default email c594a97518 Project import generated by Copybara.
GitOrigin-RevId: 301aada7a64812853f2e2634a530ef5d34505048
2022-10-21 20:38:19 +02:00

29 lines
864 B
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices }:
rustPlatform.buildRustPackage rec {
pname = "mdbook-katex";
version = "0.2.10";
src = fetchFromGitHub {
owner = "lzanini";
repo = pname;
rev = "v${version}";
hash = "sha256-5PzXX7icRxcHpzjp3x/9ssn2o0444uHrzBn1Ds1DEPM=";
};
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=";
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 ];
};
}