2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
attrs,
|
|
|
|
beautifulsoup4,
|
|
|
|
bitarray,
|
|
|
|
boolean-py,
|
|
|
|
buildPythonPackage,
|
|
|
|
chardet,
|
|
|
|
click,
|
|
|
|
colorama,
|
|
|
|
commoncode,
|
|
|
|
container-inspector,
|
|
|
|
debian-inspector,
|
|
|
|
dparse2,
|
|
|
|
extractcode,
|
|
|
|
extractcode-7z,
|
|
|
|
extractcode-libarchive,
|
|
|
|
fasteners,
|
|
|
|
fetchPypi,
|
|
|
|
fingerprints,
|
|
|
|
ftfy,
|
|
|
|
gemfileparser2,
|
|
|
|
html5lib,
|
|
|
|
importlib-metadata,
|
|
|
|
intbitset,
|
|
|
|
jaraco-functools,
|
|
|
|
javaproperties,
|
|
|
|
jinja2,
|
|
|
|
jsonstreams,
|
|
|
|
license-expression,
|
|
|
|
lxml,
|
|
|
|
markupsafe,
|
|
|
|
packageurl-python,
|
|
|
|
packaging,
|
|
|
|
parameter-expansion-patched,
|
|
|
|
pefile,
|
|
|
|
pip-requirements-parser,
|
|
|
|
pkginfo2,
|
|
|
|
pluggy,
|
|
|
|
plugincode,
|
|
|
|
publicsuffix2,
|
|
|
|
pyahocorasick,
|
|
|
|
pycryptodome,
|
|
|
|
pygmars,
|
|
|
|
pygments,
|
|
|
|
pymaven-patch,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
saneyaml,
|
|
|
|
setuptools,
|
|
|
|
spdx-tools,
|
|
|
|
text-unidecode,
|
|
|
|
toml,
|
|
|
|
typecode,
|
|
|
|
typecode-libmagic,
|
|
|
|
urlpy,
|
|
|
|
xmltodict,
|
|
|
|
zipp,
|
2021-04-25 03:57:28 +00:00
|
|
|
}:
|
2021-10-11 16:52:03 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "scancode-toolkit";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "32.2.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2021-10-11 16:52:03 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-04-25 03:57:28 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-P5Lmosa8PrqDYEbdoDLnby0ET4KsfbLWzXHmWHhy8ss=";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2021-10-11 16:52:03 +00:00
|
|
|
attrs
|
|
|
|
beautifulsoup4
|
|
|
|
bitarray
|
|
|
|
boolean-py
|
|
|
|
chardet
|
2021-04-25 03:57:28 +00:00
|
|
|
click
|
2021-10-11 16:52:03 +00:00
|
|
|
colorama
|
|
|
|
commoncode
|
2022-05-18 14:49:53 +00:00
|
|
|
container-inspector
|
2021-04-25 03:57:28 +00:00
|
|
|
debian-inspector
|
2022-05-18 14:49:53 +00:00
|
|
|
dparse2
|
2021-04-25 03:57:28 +00:00
|
|
|
extractcode
|
2021-10-11 16:52:03 +00:00
|
|
|
extractcode-7z
|
|
|
|
extractcode-libarchive
|
|
|
|
fasteners
|
|
|
|
fingerprints
|
2021-04-25 03:57:28 +00:00
|
|
|
ftfy
|
2023-05-24 13:37:59 +00:00
|
|
|
gemfileparser2
|
2021-10-11 16:52:03 +00:00
|
|
|
html5lib
|
2022-05-18 14:49:53 +00:00
|
|
|
importlib-metadata
|
2021-10-11 16:52:03 +00:00
|
|
|
intbitset
|
2023-08-04 22:07:22 +00:00
|
|
|
jaraco-functools
|
2021-10-11 16:52:03 +00:00
|
|
|
javaproperties
|
|
|
|
jinja2
|
2021-04-25 03:57:28 +00:00
|
|
|
jsonstreams
|
2021-10-11 16:52:03 +00:00
|
|
|
license-expression
|
|
|
|
lxml
|
|
|
|
markupsafe
|
2021-04-25 03:57:28 +00:00
|
|
|
packageurl-python
|
2021-10-11 16:52:03 +00:00
|
|
|
packaging
|
|
|
|
parameter-expansion-patched
|
|
|
|
pefile
|
2022-05-18 14:49:53 +00:00
|
|
|
pip-requirements-parser
|
|
|
|
pkginfo2
|
2021-10-11 16:52:03 +00:00
|
|
|
pluggy
|
|
|
|
plugincode
|
|
|
|
publicsuffix2
|
|
|
|
pyahocorasick
|
|
|
|
pycryptodome
|
|
|
|
pygmars
|
2021-04-25 03:57:28 +00:00
|
|
|
pygments
|
2021-10-11 16:52:03 +00:00
|
|
|
pymaven-patch
|
|
|
|
requests
|
|
|
|
saneyaml
|
|
|
|
spdx-tools
|
|
|
|
text-unidecode
|
|
|
|
toml
|
|
|
|
typecode
|
2021-04-25 03:57:28 +00:00
|
|
|
typecode-libmagic
|
2021-10-11 16:52:03 +00:00
|
|
|
urlpy
|
|
|
|
xmltodict
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [ zipp ];
|
2021-04-25 03:57:28 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-04-25 03:57:28 +00:00
|
|
|
|
|
|
|
# Importing scancode needs a writeable home, and preCheck happens in between
|
|
|
|
# pythonImportsCheckPhase and pytestCheckPhase.
|
|
|
|
postInstall = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "scancode" ];
|
2021-04-25 03:57:28 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Tests are outdated
|
|
|
|
"src/formattedcode/output_spdx.py"
|
|
|
|
"src/scancode/cli.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
# Takes a long time and doesn't appear to do anything
|
2021-04-25 03:57:28 +00:00
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-10-11 16:52:03 +00:00
|
|
|
description = "Tool to scan code for license, copyright, package and their documented dependencies and other interesting facts";
|
2021-04-25 03:57:28 +00:00
|
|
|
homepage = "https://github.com/nexB/scancode-toolkit";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/nexB/scancode-toolkit/blob/v${version}/CHANGELOG.rst";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = with licenses; [
|
|
|
|
asl20
|
|
|
|
cc-by-40
|
|
|
|
];
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
}
|