2019-07-23 09:07:56 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, python2Packages, gettext }:
|
2016-05-26 10:20:30 +01:00
|
|
|
|
2019-07-23 09:07:56 +01:00
|
|
|
python2Packages.buildPythonApplication rec {
|
|
|
|
pname = "linkchecker";
|
|
|
|
version = "9.4.0";
|
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;
|
2018-03-05 15:14:21 +00:00
|
|
|
rev = "v${version}";
|
2019-07-23 09:07:56 +01:00
|
|
|
sha256 = "1vbwl2vb8dyzki27z3sl5yf9dhdd2cpkg10vbgaz868dhpqlshgs";
|
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
|
|
|
|
2019-07-23 09:07:56 +01:00
|
|
|
propagatedBuildInputs = with python2Packages; [
|
|
|
|
ConfigArgParse
|
|
|
|
argcomplete
|
|
|
|
dnspython
|
|
|
|
pyxdg
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = with python2Packages; [
|
|
|
|
parameterized
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i 's/^requests.*$/requests>=2.2/' requirements.txt
|
|
|
|
sed -i "s/'request.*'/'requests >= 2.2'/" setup.py
|
|
|
|
sed -i 's~/usr/lib/python2.7/argparse.py~~g' po/Makefile
|
2016-05-26 10:20:30 +01:00
|
|
|
'';
|
|
|
|
|
2016-10-11 04:02:52 +01:00
|
|
|
checkPhase = ''
|
2019-07-23 09:07:56 +01:00
|
|
|
runHook preCheck
|
|
|
|
|
2016-10-11 04:02:52 +01:00
|
|
|
# the mime test fails for me...
|
|
|
|
rm tests/test_mimeutil.py
|
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
|
|
|
''}
|
2016-10-11 04:02:52 +01:00
|
|
|
make test PYTESTOPTS="--tb=short" TESTS="tests/test_*.py tests/logger/test_*.py"
|
2019-07-23 09:07:56 +01:00
|
|
|
|
|
|
|
runHook postCheck
|
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
|
|
|
};
|
|
|
|
}
|