12 rustPlatform.buildRustPackage rec {
16 src = fetchFromGitHub {
19 rev = "mdcat-${version}";
20 hash = "sha256-i36MYTMkbSuWxxlWUDsyYMay/4Mg7M5jEFhHM60UrkM=";
23 nativeBuildInputs = [ pkg-config asciidoctor installShellFiles ];
24 buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security;
26 cargoSha256 = "sha256-mnDUIJhEGNoh3eq2Vhww1T/tpZh9RP+RxbRsBNrpOzw=";
28 checkInputs = [ ansi2html ];
29 # Skip tests that use the network and that include files.
31 "--skip magic::tests::detect_mimetype_of_larger_than_magic_param_bytes_max_length"
32 "--skip magic::tests::detect_mimetype_of_magic_param_bytes_max_length"
33 "--skip magic::tests::detect_mimetype_of_png_image"
34 "--skip magic::tests::detect_mimetype_of_svg_image"
35 "--skip resources::tests::read_url_with_http_url_fails_when_status_404"
36 "--skip resources::tests::read_url_with_http_url_returns_content_when_status_200"
37 "--skip iterm2_tests_render_md_samples_images_md"
41 installManPage $releaseDir/build/mdcat-*/out/mdcat.1
42 installShellCompletion --bash $releaseDir/build/mdcat-*/out/completions/mdcat.bash
43 installShellCompletion --fish $releaseDir/build/mdcat-*/out/completions/mdcat.fish
44 installShellCompletion --zsh $releaseDir/build/mdcat-*/out/completions/_mdcat
48 description = "cat for markdown";
49 homepage = "https://github.com/lunaryorn/mdcat";
50 license = with licenses; [ asl20 ];
51 maintainers = with maintainers; [ davidtwco ];