From 3e5c3ad2f5093c052a9c6ca7036a7f1818a4e883 Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Fri, 10 May 2024 16:45:19 +0200 Subject: linkchecker: fix tests, separate dependencies --- pkgs/tools/networking/linkchecker/default.nix | 32 +++++++++++++-------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'pkgs') diff --git a/pkgs/tools/networking/linkchecker/default.nix b/pkgs/tools/networking/linkchecker/default.nix index 2adf2c8f82d10..dad2af76964fd 100644 --- a/pkgs/tools/networking/linkchecker/default.nix +++ b/pkgs/tools/networking/linkchecker/default.nix @@ -1,5 +1,4 @@ { lib -, stdenv , fetchFromGitHub , python3 , gettext @@ -8,50 +7,49 @@ python3.pkgs.buildPythonApplication rec { pname = "linkchecker"; version = "10.2.1"; - format = "pyproject"; + pyproject = true; src = fetchFromGitHub { - owner = pname; - repo = pname; + owner = "linkchecker"; + repo = "linkchecker"; rev = "refs/tags/v${version}"; hash = "sha256-z7Qp74cai8GfsxB4n9dSCWQepp0/4PimFiRJQBaVSoo="; }; - nativeBuildInputs = [ - gettext + nativeBuildInputs = [ gettext ]; + + build-system = with python3.pkgs; [ + hatchling + hatch-vcs + polib # translations ]; - propagatedBuildInputs = with python3.pkgs; [ + dependencies = with python3.pkgs; [ argcomplete beautifulsoup4 - configargparse dnspython - hatch-vcs - hatchling - pyopenssl requests ]; nativeCheckInputs = with python3.pkgs; [ + pyopenssl parameterized pytestCheckHook ]; disabledTests = [ - # test_timeit2 is flakey, and depends sleep being precise to the milisecond "TestLoginUrl" - "test_timeit2" + "test_timeit2" # flakey, and depends sleep being precise to the milisecond + "test_internet" # uses network, fails on Darwin (not sure why it doesn't fail on linux) ]; disabledTestPaths = [ "tests/checker/telnetserver.py" "tests/checker/test_telnet.py" - ] ++ lib.optionals stdenv.isDarwin [ - "tests/checker/test_content_allows_robots.py" - "tests/checker/test_http*.py" - "tests/test_network.py" ]; + __darwinAllowLocalNetworking = true; + meta = with lib; { description = "Check websites for broken links"; mainProgram = "linkchecker"; -- cgit 1.4.1