Unverified Commit b2d6d612 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

mdbook-pandoc: init at 0.10.5 (#448587)

parents 5c059664 44c73a56
Loading
Loading
Loading
Loading
+65 −0
Original line number Diff line number Diff line
{
  lib,
  callPackage,
  fetchFromGitHub,
  stdenv,
  makeWrapper,
  pandoc,
  rustPlatform,
  texliveSmall,
}:

rustPlatform.buildRustPackage rec {
  pname = "mdbook-pandoc";
  version = "0.10.5";

  src = fetchFromGitHub {
    owner = "max-heller";
    repo = "mdbook-pandoc";
    tag = "v${version}";
    hash = "sha256-ihKju9XXJy4JciuMLw4EcKhqSQjrBiUJDG0Rd5DbFdk=";
  };

  cargoHash = "sha256-SXXzGOBvfyLYhed5EMFUCzkFWoGEMM73PD3uWjkUcic=";

  nativeBuildInputs = [ makeWrapper ];

  nativeCheckInputs = [
    pandoc
    # some tests require pdflatex
    texliveSmall
  ];

  checkFlags =
    let
      skippedTests = [
        # failing subtly
        "tests::html::rust_reference_regression_nested_elements"
        "tests::css::css"
        "tests::definition_lists::dt_attributes"
        "tests::html::attach_id_to_div_of_stripped_html_elements"
        "tests::html::link_to_element_by_id"
        "tests::images::images"
      ]
      ++ lib.optional stdenv.buildPlatform.isDarwin "pandoc::tests::five_item_deep_list";
    in
    builtins.map (x: "--skip " + x) skippedTests;

  passthru = {
    wrapper = callPackage ./wrapper.nix { };
  };

  meta = {
    homepage = "https://github.com/max-heller/mdbook-pandoc";
    description = "A mdbook backend powered by Pandoc";
    changelog = "https://github.com/max-heller/mdbook-pandoc/releases/tag/${src.tag}";
    license = with lib.licenses; [
      asl20
      # or
      mit
    ];
    maintainers = with lib.maintainers; [
      astro
    ];
  };
}
+14 −0
Original line number Diff line number Diff line
{
  mdbook-pandoc,
  pandoc,
  symlinkJoin,
}:

symlinkJoin {
  name = "mdbook-pandoc-wrapped-${mdbook-pandoc.version}";

  paths = [
    mdbook-pandoc
    pandoc
  ];
}