nixpkgs/pkgs/development/python-modules/container-inspector/default.nix
Martin Weinelt 8056f9250c
treewide: remove redundant SETUPTOOLS_SCM_PRETEND_VERSION usage
The setuptools-scm packages gained a setup hook, that sets it to the
derivation version automatically, so setting it to that manually has
become redundant.

This also affects downstream consumers of setuptools-scm, like hatch-vcs
or flit-scm.
2023-12-20 20:16:39 +01:00

62 lines
1.3 KiB
Nix

{ lib
, attrs
, buildPythonPackage
, click
, commoncode
, dockerfile-parse
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, setuptools-scm
}:
buildPythonPackage rec {
pname = "container-inspector";
version = "32.0.1";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "nexB";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-J9glnfs6l36/IQoIvE8a+Cw4B8x/6r5UeAU8+T/OiQg=";
};
dontConfigure = true;
postPatch = ''
# PEP440 support was removed in newer setuptools, https://github.com/nexB/container-inspector/pull/51
substituteInPlace setup.cfg \
--replace ">=3.7.*" ">=3.7"
'';
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
attrs
click
dockerfile-parse
commoncode
];
nativeCheckInputs = [
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";
changelog = "https://github.com/nexB/container-inspector/releases/tag/v${version}";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}