Files
nixpkgs/pkgs/by-name/ly/lychee/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

77 lines
2.2 KiB
Nix

{
callPackage,
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
testers,
}:
rustPlatform.buildRustPackage rec {
pname = "lychee";
version = "0.20.1";
src = fetchFromGitHub {
owner = "lycheeverse";
repo = "lychee";
rev = "lychee-v${version}";
hash = "sha256-yHIj45RfQch4y+V4Ht7cDMcg5MECejxsbjuE345I/to=";
};
cargoHash = "sha256-d3umjtXPBJbPRtNCuktYhJUPgKFmB8UEeewWMekDZRE=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
cargoTestFlags = [
# don't run doctests since they tend to use the network
"--lib"
"--bins"
"--tests"
];
checkFlags = [
# Network errors for all of these tests
# "error reading DNS system conf: No such file or directory (os error 2)" } }
"--skip=archive::wayback::tests::wayback_suggestion_real_unknown"
"--skip=archive::wayback::tests::wayback_api_no_breaking_changes"
"--skip=cli::test_dont_dump_data_uris_by_default"
"--skip=cli::test_dump_data_uris_in_verbose_mode"
"--skip=cli::test_exclude_example_domains"
"--skip=cli::test_local_dir"
"--skip=cli::test_local_file"
"--skip=client::tests"
"--skip=collector::tests"
"--skip=src/lib.rs"
# Color error for those tests as we are not in a tty
"--skip=formatters::response::color::tests::test_format_response_with_error_status"
"--skip=formatters::response::color::tests::test_format_response_with_ok_status"
];
passthru.tests = {
# NOTE: These assume that testers.lycheeLinkCheck uses this exact derivation.
# Which is true most of the time, but not necessarily after overriding.
ok = callPackage ./tests/ok.nix { };
fail = callPackage ./tests/fail.nix { };
fail-emptyDirectory = callPackage ./tests/fail-emptyDirectory.nix { };
network = testers.runNixOSTest ./tests/network.nix;
};
meta = {
description = "Fast, async, stream-based link checker written in Rust";
homepage = "https://github.com/lycheeverse/lychee";
downloadPage = "https://github.com/lycheeverse/lychee/releases/tag/lychee-v${version}";
license = with lib.licenses; [
asl20
mit
];
maintainers = with lib.maintainers; [
totoroot
tuxinaut
];
mainProgram = "lychee";
};
}