nixpkgs/pkgs/tools/networking/linkchecker/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub, python3Packages, gettext }:
2022-11-22 03:27:19 +00:00
let
pypkgs = python3Packages;
2022-11-22 03:27:19 +00:00
in
pypkgs.buildPythonApplication rec {
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";
src = fetchFromGitHub {
owner = pname;
repo = pname;
2022-12-06 10:39:21 +00:00
rev = "refs/tags/v${version}";
hash = "sha256-z7Qp74cai8GfsxB4n9dSCWQepp0/4PimFiRJQBaVSoo=";
};
2022-11-22 03:27:19 +00:00
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [ gettext ];
2022-11-22 03:27:19 +00:00
propagatedBuildInputs = with pypkgs; [
argcomplete
beautifulsoup4
2022-11-22 03:27:19 +00:00
configargparse
dnspython
2022-11-22 03:27:19 +00:00
hatch-vcs
hatchling
pyopenssl
requests
];
2022-11-22 03:27:19 +00:00
checkInputs = with pypkgs; [
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'
'';
2022-11-22 03:27:19 +00:00
meta = with lib; {
description = "Check websites for broken links";
homepage = "https://linkcheck.github.io/linkchecker/";
2022-11-22 03:27:19 +00:00
license = licenses.gpl2;
maintainers = with maintainers; [ peterhoeg tweber ];
};
}