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

31 lines
970 B
Nix

{ lib, rustPlatform, fetchFromGitHub, fetchpatch }:
rustPlatform.buildRustPackage rec {
pname = "mdbook-open-on-gh";
version = "2.2.0";
src = fetchFromGitHub {
owner = "badboy";
repo = pname;
rev = "2.2.0";
hash = "sha256-x7ESuXoF5dYnJZpgDyYliVixCG4w/VX/Vhm3VqxsiEI=";
};
cargoPatches = [
# https://github.com/badboy/mdbook-open-on-gh/pull/7
(fetchpatch {
name = "update-mdbook-for-rust-1.64.patch";
url = "https://github.com/badboy/mdbook-open-on-gh/commit/bd20601bfcec144c9302b1ba1a1aff4b95b334d9.patch";
hash = "sha256-3Df9Q3sqCpZzqCN9fi+wdeWjLUW4XdywIS3QUjsDE9g=";
})
];
cargoHash = "sha256-N0RwengTWk4luPIecIxzbFReGi+PtE77FJalPq1CdbA=";
meta = with lib; {
description = "mdbook preprocessor to add a open-on-github link on every page";
homepage = "https://github.com/badboy/mdbook-open-on-gh";
license = [ licenses.mpl20 ];
maintainers = with maintainers; [ matthiasbeyer ];
};
}