2020-08-17 02:48:01 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, python3Packages, gettext }:
|
2016-05-26 09:20:30 +00:00
|
|
|
|
2022-11-22 03:27:19 +00:00
|
|
|
let
|
|
|
|
pypkgs = python3Packages;
|
2020-08-17 02:48:01 +00:00
|
|
|
|
2022-11-22 03:27:19 +00:00
|
|
|
in
|
|
|
|
pypkgs.buildPythonApplication rec {
|
2019-07-23 08:07:56 +00:00
|
|
|
pname = "linkchecker";
|
2022-12-06 10:39:21 +00:00
|
|
|
version = "10.2.1";
|
2022-11-22 03:27:19 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pypkgs.pythonOlder "3.7";
|
2016-05-26 09:20:30 +00:00
|
|
|
|
2018-03-05 15:14:21 +00:00
|
|
|
src = fetchFromGitHub {
|
2019-07-23 08:07:56 +00:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2022-12-06 10:39:21 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-z7Qp74cai8GfsxB4n9dSCWQepp0/4PimFiRJQBaVSoo=";
|
2016-05-26 09:20:30 +00:00
|
|
|
};
|
|
|
|
|
2022-11-22 03:27:19 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
2019-07-23 08:07:56 +00:00
|
|
|
nativeBuildInputs = [ gettext ];
|
2016-05-26 09:20:30 +00:00
|
|
|
|
2022-11-22 03:27:19 +00:00
|
|
|
propagatedBuildInputs = with pypkgs; [
|
2019-07-23 08:07:56 +00:00
|
|
|
argcomplete
|
2020-08-17 02:48:01 +00:00
|
|
|
beautifulsoup4
|
2022-11-22 03:27:19 +00:00
|
|
|
configargparse
|
2019-07-23 08:07:56 +00:00
|
|
|
dnspython
|
2022-11-22 03:27:19 +00:00
|
|
|
hatch-vcs
|
|
|
|
hatchling
|
|
|
|
pyopenssl
|
2019-07-23 08:07:56 +00:00
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2022-11-22 03:27:19 +00:00
|
|
|
checkInputs = with pypkgs; [
|
2019-07-23 08:07:56 +00:00
|
|
|
parameterized
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
2020-09-29 16:29:20 +00:00
|
|
|
# test_timeit2 is flakey, and depends sleep being precise to the milisecond
|
2022-11-22 03:27:19 +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'
|
2016-10-11 03:02:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-11-22 03:27:19 +00:00
|
|
|
meta = with lib; {
|
2016-05-26 09:20:30 +00:00
|
|
|
description = "Check websites for broken links";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://linkcheck.github.io/linkchecker/";
|
2022-11-22 03:27:19 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ peterhoeg tweber ];
|
2016-05-26 09:20:30 +00:00
|
|
|
};
|
|
|
|
}
|