2022-02-20 05:27:41 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, Security
|
2022-04-27 09:35:20 +00:00
|
|
|
, testers, mdbook-linkcheck }:
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "mdbook-linkcheck";
|
2022-10-06 18:32:54 +00:00
|
|
|
version = "0.7.7";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Michael-F-Bryan";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-10-06 18:32:54 +00:00
|
|
|
sha256 = "sha256-ZbraChBHuKAcUA62EVHZ1RygIotNEEGv24nhSPAEj00=";
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
cargoSha256 = "sha256-AwixlCL5ZcLgj9wYeBvkSy2U6J8alXf488l8DMn73w4=";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
buildInputs = if stdenv.isDarwin then [ Security ] else [ openssl ];
|
|
|
|
|
|
|
|
nativeBuildInputs = lib.optionals (!stdenv.isDarwin) [ pkg-config ];
|
|
|
|
|
|
|
|
OPENSSL_NO_VENDOR = 1;
|
|
|
|
|
|
|
|
doCheck = false; # tries to access network to test broken web link functionality
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
passthru.tests.version = testers.testVersion { package = mdbook-linkcheck; };
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Backend for `mdbook` which will check your links for you";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "mdbook-linkcheck";
|
2022-02-20 05:27:41 +00:00
|
|
|
homepage = "https://github.com/Michael-F-Bryan/mdbook-linkcheck";
|
|
|
|
license = licenses.mit;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [ zhaofengli matthiasbeyer ];
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
}
|