Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 attrs, 4 beautifulsoup4, 5 bitarray, 6 boolean-py, 7 buildPythonPackage, 8 chardet, 9 click, 10 colorama, 11 commoncode, 12 container-inspector, 13 debian-inspector, 14 dparse2, 15 extractcode, 16 extractcode-7z, 17 extractcode-libarchive, 18 fasteners, 19 fetchPypi, 20 fingerprints, 21 ftfy, 22 gemfileparser2, 23 html5lib, 24 importlib-metadata, 25 intbitset, 26 jaraco-functools, 27 javaproperties, 28 jinja2, 29 jsonstreams, 30 license-expression, 31 lxml, 32 markupsafe, 33 packageurl-python, 34 packaging, 35 parameter-expansion-patched, 36 pefile, 37 pip-requirements-parser, 38 pkginfo2, 39 pluggy, 40 plugincode, 41 publicsuffix2, 42 pyahocorasick, 43 pycryptodome, 44 pygmars, 45 pygments, 46 pymaven-patch, 47 pytestCheckHook, 48 pythonOlder, 49 requests, 50 saneyaml, 51 setuptools, 52 spdx-tools, 53 text-unidecode, 54 toml, 55 typecode, 56 typecode-libmagic, 57 urlpy, 58 xmltodict, 59 zipp, 60}: 61 62buildPythonPackage rec { 63 pname = "scancode-toolkit"; 64 version = "32.2.0"; 65 pyproject = true; 66 67 disabled = pythonOlder "3.7"; 68 69 src = fetchPypi { 70 inherit pname version; 71 hash = "sha256-P5Lmosa8PrqDYEbdoDLnby0ET4KsfbLWzXHmWHhy8ss="; 72 }; 73 74 dontConfigure = true; 75 76 build-system = [ setuptools ]; 77 78 dependencies = [ 79 attrs 80 beautifulsoup4 81 bitarray 82 boolean-py 83 chardet 84 click 85 colorama 86 commoncode 87 container-inspector 88 debian-inspector 89 dparse2 90 extractcode 91 extractcode-7z 92 extractcode-libarchive 93 fasteners 94 fingerprints 95 ftfy 96 gemfileparser2 97 html5lib 98 importlib-metadata 99 intbitset 100 jaraco-functools 101 javaproperties 102 jinja2 103 jsonstreams 104 license-expression 105 lxml 106 markupsafe 107 packageurl-python 108 packaging 109 parameter-expansion-patched 110 pefile 111 pip-requirements-parser 112 pkginfo2 113 pluggy 114 plugincode 115 publicsuffix2 116 pyahocorasick 117 pycryptodome 118 pygmars 119 pygments 120 pymaven-patch 121 requests 122 saneyaml 123 spdx-tools 124 text-unidecode 125 toml 126 typecode 127 typecode-libmagic 128 urlpy 129 xmltodict 130 ] ++ lib.optionals (pythonOlder "3.9") [ zipp ]; 131 132 nativeCheckInputs = [ pytestCheckHook ]; 133 134 # Importing scancode needs a writeable home, and preCheck happens in between 135 # pythonImportsCheckPhase and pytestCheckPhase. 136 postInstall = '' 137 export HOME=$(mktemp -d) 138 ''; 139 140 pythonImportsCheck = [ "scancode" ]; 141 142 disabledTestPaths = [ 143 # Tests are outdated 144 "src/formattedcode/output_spdx.py" 145 "src/scancode/cli.py" 146 ]; 147 148 # Takes a long time and doesn't appear to do anything 149 dontStrip = true; 150 151 meta = with lib; { 152 description = "Tool to scan code for license, copyright, package and their documented dependencies and other interesting facts"; 153 homepage = "https://github.com/nexB/scancode-toolkit"; 154 changelog = "https://github.com/nexB/scancode-toolkit/blob/v${version}/CHANGELOG.rst"; 155 license = with licenses; [ 156 asl20 157 cc-by-40 158 ]; 159 maintainers = [ ]; 160 }; 161}