From 3f8909378416550a5623d0380cd8be0273f2ff7a Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Wed, 21 Sep 2022 21:41:53 +0200 Subject: [PATCH] mdbook-open-on-gh: init at 2.2.0 Signed-off-by: Matthias Beyer --- pkgs/tools/text/mdbook-open-on-gh/default.nix | 22 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/tools/text/mdbook-open-on-gh/default.nix diff --git a/pkgs/tools/text/mdbook-open-on-gh/default.nix b/pkgs/tools/text/mdbook-open-on-gh/default.nix new file mode 100644 index 000000000000..09b0db3866be --- /dev/null +++ b/pkgs/tools/text/mdbook-open-on-gh/default.nix @@ -0,0 +1,22 @@ +{ lib, rustPlatform, fetchFromGitHub }: + +rustPlatform.buildRustPackage rec { + pname = "mdbook-open-on-gh"; + version = "2.2.0"; + + src = fetchFromGitHub { + owner = "badboy"; + repo = pname; + rev = "2.2.0"; + sha256 = "sha256-x7ESuXoF5dYnJZpgDyYliVixCG4w/VX/Vhm3VqxsiEI="; + }; + + cargoSha256 = "sha256-FVcCzL0jJ827HHS/9G597QjNFY3HLNYHCPWcepEulD0="; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1cd3ea826e86..bca0bb1725d4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8320,6 +8320,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; + mdbook-open-on-gh = callPackage ../tools/text/mdbook-open-on-gh { }; + mdbook-mermaid = callPackage ../tools/text/mdbook-mermaid { inherit (darwin.apple_sdk.frameworks) CoreServices; };