2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, attrs
|
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
|
|
|
, commoncode
|
|
|
|
, dockerfile-parse
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, setuptools-scm
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "container-inspector";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "32.0.1";
|
2022-05-18 14:49:53 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nexB";
|
|
|
|
repo = pname;
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
hash = "sha256-J9glnfs6l36/IQoIvE8a+Cw4B8x/6r5UeAU8+T/OiQg=";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
postPatch = ''
|
|
|
|
# PEP440 support was removed in newer setuptools, https://github.com/nexB/container-inspector/pull/51
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace ">=3.7.*" ">=3.7"
|
|
|
|
'';
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
attrs
|
|
|
|
click
|
|
|
|
dockerfile-parse
|
|
|
|
commoncode
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-05-18 14:49:53 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"container_inspector"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Suite of analysis utilities and command line tools for container images";
|
|
|
|
homepage = "https://github.com/nexB/container-inspector";
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/nexB/container-inspector/releases/tag/v${version}";
|
2022-05-18 14:49:53 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|