mdbook-mermaid: patch to work with rust 1.64

This commit is contained in:
Theodore Ni 2022-10-05 12:47:59 -07:00
parent 4a99a449ca
commit c10927773f
No known key found for this signature in database
GPG key ID: 48B67583BDDD4474

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices }: { lib, stdenv, fetchFromGitHub, fetchpatch, rustPlatform, CoreServices }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "mdbook-mermaid"; pname = "mdbook-mermaid";
@ -8,10 +8,19 @@ rustPlatform.buildRustPackage rec {
owner = "badboy"; owner = "badboy";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-zXgXgcMF7MOa9Vx3rhv9aavqRCfMcyRLtaWEvYlyaTs="; hash = "sha256-zXgXgcMF7MOa9Vx3rhv9aavqRCfMcyRLtaWEvYlyaTs=";
}; };
cargoSha256 = "sha256-sV/1caeXq/he92cvAajDL7pZJNiXCzf/DDXKnPKU4XQ="; cargoPatches = [
# https://github.com/badboy/mdbook-mermaid/pull/23
(fetchpatch {
name = "update-mdbook-for-rust-1.64.patch";
url = "https://github.com/badboy/mdbook-mermaid/commit/5a3432d1b28ef9a065dd37aa77b82a3593358793.patch";
hash = "sha256-NkCxGmRdwJ+jdkgxp5gWfGpgpLpEpKUd44LyPx0kyEE=";
})
];
cargoHash = "sha256-IkMBnBuobrJzR6+030/Wfbu2ZCjvFnjBV+6sSWdiNUw=";
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];