linkchecker: modernize, add PDF support

authored by Petr Zahradnik and committed by Peter Hoeg c02976ad 19f5098f

+20 -14
+20 -14
pkgs/by-name/li/linkchecker/package.nix
··· 1 1 { 2 + python3Packages, 2 3 lib, 3 4 fetchFromGitHub, 4 - python3, 5 5 gettext, 6 + pdfSupport ? true, 6 7 }: 7 8 8 - python3.pkgs.buildPythonApplication rec { 9 + python3Packages.buildPythonApplication rec { 9 10 pname = "linkchecker"; 10 11 version = "10.6.0"; 11 12 pyproject = true; ··· 19 20 20 21 nativeBuildInputs = [ gettext ]; 21 22 22 - build-system = with python3.pkgs; [ 23 + build-system = with python3Packages; [ 23 24 hatchling 24 25 hatch-vcs 25 26 polib # translations 26 27 ]; 27 28 28 - dependencies = with python3.pkgs; [ 29 - argcomplete 30 - beautifulsoup4 31 - dnspython 32 - requests 33 - ]; 29 + dependencies = 30 + with python3Packages; 31 + [ 32 + argcomplete 33 + beautifulsoup4 34 + dnspython 35 + requests 36 + ] 37 + ++ lib.optional pdfSupport pdfminer-six; 34 38 35 - nativeCheckInputs = with python3.pkgs; [ 39 + nativeCheckInputs = with python3Packages; [ 36 40 pyopenssl 37 41 parameterized 38 42 pytestCheckHook 43 + pyftpdlib 39 44 ]; 40 45 46 + # Needed for tests to be able to create a ~/.local/share/linkchecker/plugins directory 47 + preCheck = '' 48 + export HOME=$(mktemp -d) 49 + ''; 50 + 41 51 disabledTests = [ 42 - "TestLoginUrl" 43 52 "test_timeit2" # flakey, and depends sleep being precise to the milisecond 44 - "test_internet" # uses network, fails on Darwin (not sure why it doesn't fail on linux) 45 - "test_markdown" # uses sys.version_info for conditional testing 46 - "test_itms_services" # uses sys.version_info for conditional testing 47 53 ]; 48 54 49 55 __darwinAllowLocalNetworking = true;