diff --git a/pkgs/tools/text/mdbook-admonish/default.nix b/pkgs/by-name/md/mdbook-admonish/package.nix similarity index 74% rename from pkgs/tools/text/mdbook-admonish/default.nix rename to pkgs/by-name/md/mdbook-admonish/package.nix index e38687e819b6..1e41e3056248 100644 --- a/pkgs/tools/text/mdbook-admonish/default.nix +++ b/pkgs/by-name/md/mdbook-admonish/package.nix @@ -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 diff --git a/pkgs/tools/text/mdbook-epub/default.nix b/pkgs/by-name/md/mdbook-epub/package.nix similarity index 62% rename from pkgs/tools/text/mdbook-epub/default.nix rename to pkgs/by-name/md/mdbook-epub/package.nix index c6731a27fade..e172c27f7424 100644 --- a/pkgs/tools/text/mdbook-epub/default.nix +++ b/pkgs/by-name/md/mdbook-epub/package.nix @@ -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 ]; diff --git a/pkgs/tools/text/mdbook-footnote/default.nix b/pkgs/by-name/md/mdbook-footnote/package.nix similarity index 75% rename from pkgs/tools/text/mdbook-footnote/default.nix rename to pkgs/by-name/md/mdbook-footnote/package.nix index 0559edf0488a..a5630089d293 100644 --- a/pkgs/tools/text/mdbook-footnote/default.nix +++ b/pkgs/by-name/md/mdbook-footnote/package.nix @@ -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 ]; diff --git a/pkgs/tools/text/mdbook-graphviz/default.nix b/pkgs/by-name/md/mdbook-graphviz/package.nix similarity index 82% rename from pkgs/tools/text/mdbook-graphviz/default.nix rename to pkgs/by-name/md/mdbook-graphviz/package.nix index 253b579bb191..d0ceadc829d2 100644 --- a/pkgs/tools/text/mdbook-graphviz/default.nix +++ b/pkgs/by-name/md/mdbook-graphviz/package.nix @@ -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 ]; diff --git a/pkgs/tools/text/mdbook-katex/default.nix b/pkgs/by-name/md/mdbook-katex/package.nix similarity index 74% rename from pkgs/tools/text/mdbook-katex/default.nix rename to pkgs/by-name/md/mdbook-katex/package.nix index 260dcccd3e01..1771778f5f76 100644 --- a/pkgs/tools/text/mdbook-katex/default.nix +++ b/pkgs/by-name/md/mdbook-katex/package.nix @@ -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 ]; diff --git a/pkgs/tools/text/mdbook-mermaid/default.nix b/pkgs/by-name/md/mdbook-mermaid/package.nix similarity index 77% rename from pkgs/tools/text/mdbook-mermaid/default.nix rename to pkgs/by-name/md/mdbook-mermaid/package.nix index 8afaa0b1b00d..6281a185465e 100644 --- a/pkgs/tools/text/mdbook-mermaid/default.nix +++ b/pkgs/by-name/md/mdbook-mermaid/package.nix @@ -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 ]; diff --git a/pkgs/tools/text/mdbook-pdf/default.nix b/pkgs/by-name/md/mdbook-pdf/package.nix similarity index 75% rename from pkgs/tools/text/mdbook-pdf/default.nix rename to pkgs/by-name/md/mdbook-pdf/package.nix index 2abc8e53a1a2..7be57a06b55d 100644 --- a/pkgs/tools/text/mdbook-pdf/default.nix +++ b/pkgs/by-name/md/mdbook-pdf/package.nix @@ -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 ]; diff --git a/pkgs/tools/text/mdbook-plantuml/default.nix b/pkgs/by-name/md/mdbook-plantuml/package.nix similarity index 82% rename from pkgs/tools/text/mdbook-plantuml/default.nix rename to pkgs/by-name/md/mdbook-plantuml/package.nix index 8e844b8f1095..15ced4627992 100644 --- a/pkgs/tools/text/mdbook-plantuml/default.nix +++ b/pkgs/by-name/md/mdbook-plantuml/package.nix @@ -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 ]; diff --git a/pkgs/tools/text/mdbook-toc/default.nix b/pkgs/by-name/md/mdbook-toc/package.nix similarity index 70% rename from pkgs/tools/text/mdbook-toc/default.nix rename to pkgs/by-name/md/mdbook-toc/package.nix index 5f5c1b289899..86cbc65de72a 100644 --- a/pkgs/tools/text/mdbook-toc/default.nix +++ b/pkgs/by-name/md/mdbook-toc/package.nix @@ -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 ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d1fad5c7dcd1..8d778c0f8b30 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3975,51 +3975,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; }; };