From aaf821b4208b829d6a398cdd6b8db795daf4eb6d Mon Sep 17 00:00:00 2001 From: zapashcanon Date: Sun, 21 Sep 2025 23:42:22 +0200 Subject: [PATCH] mdbook-plugins: init at 0.2.3 --- pkgs/by-name/md/mdbook-plugins/package.nix | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 pkgs/by-name/md/mdbook-plugins/package.nix diff --git a/pkgs/by-name/md/mdbook-plugins/package.nix b/pkgs/by-name/md/mdbook-plugins/package.nix new file mode 100644 index 000000000000..4ab03088820b --- /dev/null +++ b/pkgs/by-name/md/mdbook-plugins/package.nix @@ -0,0 +1,58 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + curl, + openssl, + versionCheckHook, + nix-update-script, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "mdbook-plugins"; + version = "0.2.3"; + + src = fetchFromGitHub { + owner = "RustForWeb"; + repo = "mdbook-plugins"; + rev = "v${finalAttrs.version}"; + hash = "sha256-IyIUJH5pbuvDarQf7yvrStMIb5HdimudYF+Tq/+OtvY="; + }; + + cargoHash = "sha256-/UM85Lhq52MFTjczPRuXENPJOQkjiHLWGPPW/VD9kBQ="; + + nativeBuildInputs = [ + pkg-config + rustPlatform.bindgenHook + ]; + + buildInputs = [ + curl + openssl + ]; + + env.OPENSSL_NO_VENDOR = true; + + cargoBuildFlags = [ + "--bin=mdbook-tabs" + "--bin=mdbook-trunk" + ]; + + doInstallCheck = true; + versionCheckProgramArg = "--version"; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Plugins for mdBook"; + homepage = "https://mdbook-plugins.rustforweb.org/"; + changelog = "https://github.com/RustForWeb/mdbook-plugins/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ redianthus ]; + mainProgram = "mdbook-tabs"; + }; +})