mdbook: move to pkgs/by-name (#382504)

This commit is contained in:
Gaétan Lepage 2025-02-16 10:40:55 +01:00 committed by GitHub
commit 75c5300f91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 41 additions and 128 deletions

View File

@ -1,9 +1,7 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
CoreServices,
}:
rustPlatform.buildRustPackage rec {
@ -13,20 +11,18 @@ rustPlatform.buildRustPackage rec {
src = fetchFromGitHub {
owner = "tommilligan";
repo = pname;
rev = "v${version}";
tag = "v${version}";
hash = "sha256-GNQIOjgHCt3XPCzF0RjV9YStI8psLdHhTPuTkdgx8vA=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-GbXLlWHbLL7HbyuX223S/o1/+LwbK8FjL7lnEgVVn00=";
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ];
meta = with lib; {
meta = {
description = "Preprocessor for mdbook to add Material Design admonishments";
mainProgram = "mdbook-admonish";
license = licenses.mit;
maintainers = with maintainers; [
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
jmgilman
Frostman
matthiasbeyer

View File

@ -1,48 +1,35 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
pkg-config,
bzip2,
CoreServices,
}:
let
rustPlatform.buildRustPackage rec {
pname = "mdbook-epub";
version = "0.4.37";
in
rustPlatform.buildRustPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "michael-f-bryan";
repo = pname;
rev = version;
tag = version;
hash = "sha256-ddWClkeGabvqteVUtuwy4pWZGnarrKrIbuPEe62m6es=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-3R81PJCOFc22QDHH2BqGB9jjvEcMc1axoySSJLJD3wI=";
nativeBuildInputs = [
pkg-config
];
nativeBuildInputs = [ pkg-config ];
buildInputs =
[
bzip2
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
CoreServices
];
buildInputs = [ bzip2 ];
meta = with lib; {
meta = {
description = "mdbook backend for generating an e-book in the EPUB format";
mainProgram = "mdbook-epub";
homepage = "https://michael-f-bryan.github.io/mdbook-epub";
license = licenses.mpl20;
maintainers = with maintainers; [
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [
yuu
matthiasbeyer
];

View File

@ -1,9 +1,7 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
CoreServices,
}:
rustPlatform.buildRustPackage rec {
pname = "mdbook-footnote";
@ -12,21 +10,19 @@ rustPlatform.buildRustPackage rec {
src = fetchFromGitHub {
owner = "daviddrysdale";
repo = "mdbook-footnote";
rev = "v${version}";
tag = "v${version}";
hash = "sha256-WUMgm1hwsU9BeheLfb8Di0AfvVQ6j92kXxH2SyG3ses=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-3tuejWMZlEAOgnBKEqZP2a72a8QP1yamfE/g2BJDEbg=";
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ];
meta = with lib; {
meta = {
description = "Preprocessor for mdbook to support the inclusion of automatically numbered footnotes";
mainProgram = "mdbook-footnote";
homepage = "https://github.com/daviddrysdale/mdbook-footnote";
license = licenses.asl20;
maintainers = with maintainers; [
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
brianmcgillion
matthiasbeyer
];

View File

@ -1,9 +1,7 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
CoreServices,
graphviz,
}:
@ -23,17 +21,15 @@ rustPlatform.buildRustPackage rec {
useFetchCargoVendor = true;
cargoHash = "sha256-A1pFifxshWynwA88iLTMOm21NKCH8fHl5nFiV4wEG8A=";
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ];
nativeCheckInputs = [ graphviz ];
meta = with lib; {
meta = {
description = "Preprocessor for mdbook, rendering Graphviz graphs to HTML at build time";
mainProgram = "mdbook-graphviz";
homepage = "https://github.com/dylanowen/mdbook-graphviz";
changelog = "https://github.com/dylanowen/mdbook-graphviz/releases/tag/v${version}";
license = [ licenses.mpl20 ];
maintainers = with maintainers; [
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [
lovesegfault
matthiasbeyer
];

View File

@ -2,8 +2,6 @@
lib,
rustPlatform,
fetchCrate,
stdenv,
CoreServices,
}:
rustPlatform.buildRustPackage rec {
@ -18,14 +16,12 @@ rustPlatform.buildRustPackage rec {
useFetchCargoVendor = true;
cargoHash = "sha256-EoWsjuvvWeAI3OnVRJQT2hwoYq4BNqqvitH9LT0XGnA=";
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ];
meta = with lib; {
meta = {
description = "Preprocessor for mdbook, rendering LaTeX equations to HTML at build time";
mainProgram = "mdbook-katex";
homepage = "https://github.com/lzanini/${pname}";
license = [ licenses.mit ];
maintainers = with maintainers; [
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
lovesegfault
matthiasbeyer
];

View File

@ -1,9 +1,7 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
CoreServices,
}:
rustPlatform.buildRustPackage rec {
@ -20,17 +18,13 @@ rustPlatform.buildRustPackage rec {
useFetchCargoVendor = true;
cargoHash = "sha256-yb4EWSl/mQp5q9fmYUq6UEdsknqfUx//BZ8IK/BVs7g=";
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
CoreServices
];
meta = with lib; {
meta = {
description = "Preprocessor for mdbook to add mermaid.js support";
mainProgram = "mdbook-mermaid";
homepage = "https://github.com/badboy/mdbook-mermaid";
changelog = "https://github.com/badboy/mdbook-mermaid/blob/v${version}/CHANGELOG.md";
license = licenses.mpl20;
maintainers = with maintainers; [
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [
xrelkd
matthiasbeyer
];

View File

@ -1,11 +1,9 @@
{
lib,
stdenv,
fetchCrate,
rustPlatform,
pkg-config,
openssl,
CoreServices,
}:
rustPlatform.buildRustPackage rec {
@ -20,17 +18,9 @@ rustPlatform.buildRustPackage rec {
useFetchCargoVendor = true;
cargoHash = "sha256-cZNTfhrpuEoAXviog/qq2PWii/wycxxq5l/vFHW1f6k=";
nativeBuildInputs = [
pkg-config
];
nativeBuildInputs = [ pkg-config ];
buildInputs =
[
openssl
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
CoreServices
];
buildInputs = [ openssl ];
# Stop downloading from the Internet to
# generate the Chrome Devtools Protocol
@ -42,13 +32,13 @@ rustPlatform.buildRustPackage rec {
# No test.
doCheck = false;
meta = with lib; {
meta = {
description = "Backend for mdBook written in Rust for generating PDF";
mainProgram = "mdbook-pdf";
homepage = "https://github.com/HollowMan6/mdbook-pdf";
changelog = "https://github.com/HollowMan6/mdbook-pdf/releases/tag/v${version}";
license = licenses.gpl3Plus;
maintainers = with maintainers; [
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
hollowman6
matthiasbeyer
];

View File

@ -2,11 +2,9 @@
lib,
fetchFromGitHub,
fetchpatch,
stdenv,
rustPlatform,
pkg-config,
openssl,
CoreServices,
}:
rustPlatform.buildRustPackage rec {
@ -16,7 +14,7 @@ rustPlatform.buildRustPackage rec {
src = fetchFromGitHub {
owner = "sytsereitsma";
repo = pname;
rev = "v${version}";
tag = "v${version}";
hash = "sha256-26epwn6j/ZeMAphiFsrLjS0KIewvElr7V3p/EDr4Uqk=";
};
@ -34,14 +32,14 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ];
buildInputs = [ openssl ];
meta = with lib; {
meta = {
description = "mdBook preprocessor to render PlantUML diagrams to png images in the book output directory";
mainProgram = "mdbook-plantuml";
homepage = "https://github.com/sytsereitsma/mdbook-plantuml";
license = [ licenses.mit ];
maintainers = with maintainers; [
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
jcouyang
matthiasbeyer
];

View File

@ -1,9 +1,7 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
CoreServices,
}:
rustPlatform.buildRustPackage rec {
@ -13,20 +11,18 @@ rustPlatform.buildRustPackage rec {
src = fetchFromGitHub {
owner = "badboy";
repo = pname;
rev = version;
tag = version;
sha256 = "sha256-OFNp+kFDafYbzqb7xfPTO885cAjgWfNeDvUPDKq5GJU=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-0x/x3TRwRinQ/uLCQoRrJOE/mc2snkL/MCz76nQqb5E=";
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ];
meta = with lib; {
meta = {
description = "Preprocessor for mdbook to add inline Table of Contents support";
mainProgram = "mdbook-toc";
homepage = "https://github.com/badboy/mdbook-toc";
license = [ licenses.mpl20 ];
maintainers = with maintainers; [ matthiasbeyer ];
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ matthiasbeyer ];
};
}

View File

@ -3971,51 +3971,15 @@ with pkgs;
md2pdf = with python3Packages; toPythonApplication md2pdf;
mdbook-epub = callPackage ../tools/text/mdbook-epub {
inherit (darwin.apple_sdk.frameworks) CoreServices;
};
mdbook-graphviz = callPackage ../tools/text/mdbook-graphviz {
inherit (darwin.apple_sdk.frameworks) CoreServices;
};
mdbook-katex = callPackage ../tools/text/mdbook-katex {
inherit (darwin.apple_sdk.frameworks) CoreServices;
mdcat = callPackage ../tools/text/mdcat {
inherit (darwin.apple_sdk.frameworks) Security SystemConfiguration;
inherit (python3Packages) ansi2html;
};
mdbook-linkcheck = callPackage ../tools/text/mdbook-linkcheck {
inherit (darwin.apple_sdk.frameworks) Security;
};
mdbook-mermaid = callPackage ../tools/text/mdbook-mermaid {
inherit (darwin.apple_sdk.frameworks) CoreServices;
};
mdbook-pdf = callPackage ../tools/text/mdbook-pdf {
inherit (darwin.apple_sdk.frameworks) CoreServices;
};
mdbook-plantuml = callPackage ../tools/text/mdbook-plantuml {
inherit (darwin.apple_sdk.frameworks) CoreServices;
};
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;
};
mdbook-footnote = callPackage ../tools/text/mdbook-footnote {
inherit (darwin.apple_sdk.frameworks) CoreServices;
};
mdcat = callPackage ../tools/text/mdcat {
inherit (darwin.apple_sdk.frameworks) Security SystemConfiguration;
inherit (python3Packages) ansi2html;
};
medfile = callPackage ../development/libraries/medfile {
hdf5 = hdf5.override { usev110Api = true; };
};