@@ -1,105 +1,141 @@
11{ lib
2−, fetchPypi
2+, attrs
3+, beautifulsoup4
4+, bitarray
5+, boolean-py
36, buildPythonPackage
4−, isPy3k
5−, markupsafe
7+, chardet
68, click
7−, typecode
8−, gemfileparser
9−, pefile
10−, fingerprints
11−, spdx-tools
12−, fasteners
13−, pycryptodome
14−, urlpy
15−, dparse
16−, jaraco_functools
17−, pkginfo
9+, colorama
10+, commoncode
1811, debian-inspector
12+, dparse
1913, extractcode
14+, extractcode-7z
15+, extractcode-libarchive
16+, fasteners
17+, fetchPypi
18+, fingerprints
2019, ftfy
21−, pyahocorasick
22−, colorama
20+, gemfileparser
21+, html5lib
22+, importlib-metadata
23+, intbitset
24+, jaraco_functools
25+, javaproperties
26+, jinja2
2327, jsonstreams
28+, license-expression
29+, lxml
30+, markupsafe
2431, packageurl-python
25−, pymaven-patch
26−, nltk
32+, packaging
33+, parameter-expansion-patched
34+, pefile
35+, pkginfo
36+, pluggy
37+, plugincode
38+, publicsuffix2
39+, pyahocorasick
40+, pycryptodome
41+, pygmars
2742, pygments
28−, bitarray
29−, jinja2
30−, javaproperties
31−, boolean-py
32−, license-expression
33−, extractcode-7z
34−, extractcode-libarchive
35−, typecode-libmagic
43+, pymaven-patch
3644, pytestCheckHook
45+, pythonOlder
46+, requests
47+, saneyaml
48+, spdx-tools
49+, text-unidecode
50+, toml
51+, typecode
52+, typecode-libmagic
53+, typing
54+, urlpy
55+, xmltodict
56+, zipp
3757}:
58+
3859buildPythonPackage rec {
3960 pname = "scancode-toolkit";
40− version = "21.8.4";
41− disabled = !isPy3k;
61+ version = "30.1.0";
62+
63+ disabled = pythonOlder "3.6";
4264
4365 src = fetchPypi {
4466 inherit pname version;
45− sha256 = "c18340067244274c67e166f701c60e747e1d0bccb17efc99f277a4bc0a5a13c6";
67+ sha256 = "sha256-UYQf+cBi2FmyZxIbQJo7vLjPuoePIMC8FugvoG1Ebj0=";
4668 };
4769
4870 dontConfigure = true;
4971
50− # https://github.com/nexB/scancode-toolkit/issues/2501
51− # * dparse2 is a "Temp fork for Python 2 support", but pdfminer requires
52− # Python 3, so it's "fine" to leave dparse2 unpackaged and use the "normal"
53− # version
54− # * ftfy was pinned for similar reasons (to support Python 2), but rather than
55− # packaging an older version, I figured it would be better to remove the
56− # erroneous (at least for our usage) version bound
57− # * bitarray's version bound appears to be unnecessary for similar reasons
58− postPatch = ''
59− substituteInPlace setup.cfg \
60− --replace "dparse2" "dparse" \
61− --replace "ftfy < 5.0.0" "ftfy" \
62− --replace "bitarray >= 0.8.1, < 1.0.0" "bitarray"
63− '';
64−
6572 propagatedBuildInputs = [
66− markupsafe
73+ attrs
74+ beautifulsoup4
75+ bitarray
76+ boolean-py
77+ chardet
6778 click
68− typecode
69− gemfileparser
70− pefile
71− fingerprints
72− spdx-tools
73− fasteners
74− pycryptodome
75− urlpy
76− dparse
77− jaraco_functools
78− pkginfo
79+ colorama
80+ commoncode
7981 debian-inspector
82+ dparse
8083 extractcode
84+ extractcode-7z
85+ extractcode-libarchive
86+ fasteners
87+ fingerprints
8188 ftfy
82− pyahocorasick
83− colorama
89+ gemfileparser
90+ html5lib
91+ intbitset
92+ jaraco_functools
93+ javaproperties
94+ jinja2
8495 jsonstreams
96+ license-expression
97+ lxml
98+ markupsafe
8599 packageurl-python
86− pymaven-patch
87− nltk
100+ packaging
101+ parameter-expansion-patched
102+ pefile
103+ pkginfo
104+ pluggy
105+ plugincode
106+ publicsuffix2
107+ pyahocorasick
108+ pycryptodome
109+ pygmars
88110 pygments
89− bitarray
90− jinja2
91− javaproperties
92− boolean-py
93− license-expression
94− extractcode-7z
95− extractcode-libarchive
111+ pymaven-patch
112+ requests
113+ saneyaml
114+ spdx-tools
115+ text-unidecode
116+ toml
117+ typecode
96118 typecode-libmagic
119+ urlpy
120+ xmltodict
121+ zipp
122+ ] ++ lib.optionals (pythonOlder "3.9") [
123+ importlib-metadata
124+ ] ++ lib.optionals (pythonOlder "3.7") [
125+ typing
97126 ];
98127
99128 checkInputs = [
100129 pytestCheckHook
101130 ];
102131
132+ postPatch = ''
133+ substituteInPlace setup.cfg \
134+ --replace "pluggy >= 0.12.0, < 1.0" "pluggy" \
135+ --replace "pygmars >= 0.7.0" "pygmars" \
136+ --replace "license_expression >= 21.6.14" "license_expression"
137+ '';
138+
103139 # Importing scancode needs a writeable home, and preCheck happens in between
104140 # pythonImportsCheckPhase and pytestCheckPhase.
105141 postInstall = ''
@@ -114,7 +150,7 @@ buildPythonPackage rec {
114150 dontStrip = true;
115151
116152 meta = with lib; {
117− description = "A tool to scan code for license, copyright, package and their documented dependencies and other interesting facts";
153+ description = "Tool to scan code for license, copyright, package and their documented dependencies and other interesting facts";
118154 homepage = "https://github.com/nexB/scancode-toolkit";
119155 license = with licenses; [ asl20 cc-by-40 ];
120156 maintainers = teams.determinatesystems.members;