2020-08-17 03:48:01 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, python3Packages, gettext }:
|
2016-05-26 10:20:30 +01:00
|
|
|
|
2020-08-17 03:48:01 +01:00
|
|
|
with python3Packages;
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
2019-07-23 09:07:56 +01:00
|
|
|
pname = "linkchecker";
|
2020-08-17 03:48:01 +01:00
|
|
|
version = "unstable-2020-08-15";
|
2016-05-26 10:20:30 +01:00
|
|
|
|
2018-03-05 15:14:21 +00:00
|
|
|
src = fetchFromGitHub {
|
2019-07-23 09:07:56 +01:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2020-08-17 03:48:01 +01:00
|
|
|
rev = "0086c28b3a419faa60562f2713346996062c03c2";
|
|
|
|
sha256 = "0am5id8vqlqn1gb9jri0vjgiq5ffgrjq8yzdk1zc98gn2n0397wl";
|
2016-05-26 10:20:30 +01:00
|
|
|
};
|
|
|
|
|
2019-07-23 09:07:56 +01:00
|
|
|
nativeBuildInputs = [ gettext ];
|
2016-05-26 10:20:30 +01:00
|
|
|
|
2020-08-17 03:48:01 +01:00
|
|
|
propagatedBuildInputs = [
|
2019-07-23 09:07:56 +01:00
|
|
|
ConfigArgParse
|
|
|
|
argcomplete
|
2020-08-17 03:48:01 +01:00
|
|
|
beautifulsoup4
|
2019-07-23 09:07:56 +01:00
|
|
|
dnspython
|
|
|
|
pyxdg
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2020-08-17 03:48:01 +01:00
|
|
|
checkInputs = [
|
2019-07-23 09:07:56 +01:00
|
|
|
parameterized
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i 's/^requests.*$/requests>=2.2/' requirements.txt
|
|
|
|
sed -i "s/'request.*'/'requests >= 2.2'/" setup.py
|
2016-05-26 10:20:30 +01:00
|
|
|
'';
|
|
|
|
|
2016-10-11 04:02:52 +01:00
|
|
|
checkPhase = ''
|
2017-02-26 11:21:24 +00:00
|
|
|
${lib.optionalString stdenv.isDarwin ''
|
2019-07-23 09:07:56 +01:00
|
|
|
# network tests fails on darwin
|
|
|
|
rm tests/test_network.py
|
2017-02-26 11:21:24 +00:00
|
|
|
''}
|
2020-08-17 03:48:01 +01:00
|
|
|
pytest --ignore=tests/checker/{test_telnet,telnetserver}.py -k 'not TestLoginUrl'
|
2016-10-11 04:02:52 +01:00
|
|
|
'';
|
|
|
|
|
2016-05-26 10:20:30 +01:00
|
|
|
meta = {
|
|
|
|
description = "Check websites for broken links";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://linkcheck.github.io/linkchecker/";
|
2016-05-26 10:20:30 +01:00
|
|
|
license = lib.licenses.gpl2;
|
2018-03-05 15:14:21 +00:00
|
|
|
maintainers = with lib.maintainers; [ peterhoeg tweber ];
|
2016-05-26 10:20:30 +01:00
|
|
|
};
|
|
|
|
}
|