summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2022-10-01 10:00:42 +0200
committerMatthias Beyer <mail@beyermatthias.de>2022-10-01 10:00:42 +0200
commit6ce68674a45a1c0e7fe0dcdb8635d474c454c1a6 (patch)
tree89f1801d16ee5f093924b38a80c9e1216d3684c4
parent9fcf682bd1076e52f878c55b44b6c58f8ed41b8a (diff)
mdbook-toc: init at 0.9.0mdbook-toc
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--pkgs/tools/text/mdbook-toc/default.nix25
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/tools/text/mdbook-toc/default.nix b/pkgs/tools/text/mdbook-toc/default.nix
new file mode 100644
index 000000000000..88f3bd599f0e
--- /dev/null
+++ b/pkgs/tools/text/mdbook-toc/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices }:
+
+rustPlatform.buildRustPackage rec {
+ pname = "mdbook-toc";
+ version = "0.9.0";
+
+ src = fetchFromGitHub {
+ owner = "badboy";
+ repo = pname;
+ rev = version;
+ sha256 = "sha256-7JpMBQqglLn33HwMBuIR5Hc0ISmzLPjQXGJVRwwl4OU=";
+ };
+
+ cargoSha256 = "sha256-Vj9DSjJtkexKly8IWlGEQkVrjSHcK1/2i+2g2Ht0eUo=";
+
+ buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
+
+ meta = with lib; {
+ description = "A preprocessor for mdbook to add inline Table of Contents support";
+ homepage = "https://github.com/badboy/mdbook-toc";
+ license = [ licenses.mpl20 ];
+ maintainers = with maintainers; [ matthiasbeyer ];
+ };
+}
+
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 8bd18b618f8a..485f9e39efa2 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -8408,6 +8408,10 @@ with pkgs;
openssl = openssl_1_1;
};
+ mdbook-toc = callPackage ../tools/text/mdbook-toc {
+ inherit (darwin.apple_sdk.frameworks) CoreServices;
+ };
+
mdbook-admonish = callPackage ../tools/text/mdbook-admonish {
inherit (darwin.apple_sdk.frameworks) CoreServices;
};