depot/third_party/nixpkgs/pkgs/tools/text/mdbook-linkcheck/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

34 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, Security
, testers, mdbook-linkcheck }:
rustPlatform.buildRustPackage rec {
pname = "mdbook-linkcheck";
version = "0.7.7";
src = fetchFromGitHub {
owner = "Michael-F-Bryan";
repo = pname;
rev = "v${version}";
sha256 = "sha256-ZbraChBHuKAcUA62EVHZ1RygIotNEEGv24nhSPAEj00=";
};
cargoSha256 = "sha256-AwixlCL5ZcLgj9wYeBvkSy2U6J8alXf488l8DMn73w4=";
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
passthru.tests.version = testers.testVersion { package = mdbook-linkcheck; };
meta = with lib; {
description = "Backend for `mdbook` which will check your links for you";
mainProgram = "mdbook-linkcheck";
homepage = "https://github.com/Michael-F-Bryan/mdbook-linkcheck";
license = licenses.mit;
maintainers = with maintainers; [ zhaofengli matthiasbeyer ];
};
}