2020-09-25 04:45:31 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, python3Packages, gettext }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
let
|
|
|
|
pypkgs = python3Packages;
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
in
|
|
|
|
pypkgs.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "linkchecker";
|
2022-11-27 09:42:12 +00:00
|
|
|
version = "10.2.0";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pypkgs.pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2021-02-05 17:12:51 +00:00
|
|
|
rev = "v" + version;
|
2022-11-27 09:42:12 +00:00
|
|
|
hash = "sha256-wMiKS14fX5mkY1OwxQPFKm7i4WMFQKg3tdZZqD0g0Rw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ gettext ];
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
propagatedBuildInputs = with pypkgs; [
|
2020-04-24 23:36:52 +00:00
|
|
|
argcomplete
|
2020-09-25 04:45:31 +00:00
|
|
|
beautifulsoup4
|
2022-11-27 09:42:12 +00:00
|
|
|
configargparse
|
2020-04-24 23:36:52 +00:00
|
|
|
dnspython
|
2022-11-27 09:42:12 +00:00
|
|
|
hatch-vcs
|
|
|
|
hatchling
|
|
|
|
pyopenssl
|
2020-04-24 23:36:52 +00:00
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
checkInputs = with pypkgs; [
|
2020-04-24 23:36:52 +00:00
|
|
|
parameterized
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
# test_timeit2 is flakey, and depends sleep being precise to the milisecond
|
2022-11-27 09:42:12 +00:00
|
|
|
checkPhase = lib.optionalString stdenv.isDarwin ''
|
|
|
|
# network tests fails on darwin
|
|
|
|
rm tests/test_network.py tests/checker/test_http*.py tests/checker/test_content_allows_robots.py tests/checker/test_noproxy.py
|
|
|
|
'' + ''
|
|
|
|
pytest --ignore=tests/checker/{test_telnet,telnetserver}.py \
|
|
|
|
-k 'not TestLoginUrl and not test_timeit2'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Check websites for broken links";
|
|
|
|
homepage = "https://linkcheck.github.io/linkchecker/";
|
2022-11-27 09:42:12 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ peterhoeg tweber ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|