1 { lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, Security
2 , testers, mdbook-linkcheck }:
4 rustPlatform.buildRustPackage rec {
5 pname = "mdbook-linkcheck";
8 src = fetchFromGitHub {
9 owner = "Michael-F-Bryan";
12 sha256 = "sha256-ZbraChBHuKAcUA62EVHZ1RygIotNEEGv24nhSPAEj00=";
15 cargoHash = "sha256-AwixlCL5ZcLgj9wYeBvkSy2U6J8alXf488l8DMn73w4=";
17 buildInputs = if stdenv.hostPlatform.isDarwin then [ Security ] else [ openssl ];
19 nativeBuildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ pkg-config ];
21 OPENSSL_NO_VENDOR = 1;
23 doCheck = false; # tries to access network to test broken web link functionality
25 passthru.tests.version = testers.testVersion { package = mdbook-linkcheck; };
28 description = "Backend for `mdbook` which will check your links for you";
29 mainProgram = "mdbook-linkcheck";
30 homepage = "https://github.com/Michael-F-Bryan/mdbook-linkcheck";
31 license = licenses.mit;
32 maintainers = with maintainers; [ zhaofengli matthiasbeyer ];