lol
at 23.11-beta 68 lines 1.5 kB view raw
1{ lib 2, fetchFromGitHub 3, python3 4}: 5 6python3.pkgs.buildPythonApplication rec { 7 pname = "pip-audit"; 8 version = "2.6.1"; 9 format = "pyproject"; 10 11 src = fetchFromGitHub { 12 owner = "trailofbits"; 13 repo = pname; 14 rev = "refs/tags/v${version}"; 15 hash = "sha256-bB3yaQweXyj4O2TMHBhyMz5tm2Th0cDqRZ1B9lv+ARk="; 16 }; 17 18 nativeBuildInputs = with python3.pkgs; [ 19 flit-core 20 ]; 21 22 propagatedBuildInputs = with python3.pkgs; [ 23 cachecontrol 24 cyclonedx-python-lib 25 html5lib 26 packaging 27 pip-api 28 pip-requirements-parser 29 rich 30 toml 31 ] ++ cachecontrol.optional-dependencies.filecache; 32 33 nativeCheckInputs = with python3.pkgs; [ 34 pretend 35 pytestCheckHook 36 ]; 37 38 pythonImportsCheck = [ 39 "pip_audit" 40 ]; 41 42 preCheck = '' 43 export HOME=$(mktemp -d); 44 ''; 45 46 disabledTestPaths = [ 47 # Tests require network access 48 "test/dependency_source/test_requirement.py" 49 "test/service/test_pypi.py" 50 "test/service/test_osv.py" 51 ]; 52 53 disabledTests = [ 54 # Tests requrire network access 55 "test_get_pip_cache" 56 "test_virtual_env" 57 "test_pyproject_source" 58 "test_pyproject_source_duplicate_deps" 59 ]; 60 61 meta = with lib; { 62 description = "Tool for scanning Python environments for known vulnerabilities"; 63 homepage = "https://github.com/trailofbits/pip-audit"; 64 changelog = "https://github.com/pypa/pip-audit/releases/tag/v${version}"; 65 license = with licenses; [ asl20 ]; 66 maintainers = with maintainers; [ fab ]; 67 }; 68}