Files
nixpkgs/pkgs/development/python-modules/covdefaults/default.nix
Antonio Spadaro ff11fa1628 python3Packages.covdefaults: init at 2.3.0
It is going to be required by the check phase of the upcoming version of `datamodel-code-generator`.

Co-authored-by: Diogo Correia <me@diogotc.com>
2026-09-27 17:26:38 +02:00

54 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch2,
# build-system
setuptools,
# dependencies
coverage,
# tests
pytestCheckHook,
}:
buildPythonPackage (finalAttrs: {
pname = "covdefaults";
version = "2.3.0";
pyproject = true;
src = fetchFromGitHub {
owner = "asottile";
repo = "covdefaults";
tag = "v${finalAttrs.version}";
hash = "sha256-/RqqvGL2a6sCNe5HrJ9Ty5SlingQ+dblVtGYd+z8ZKw=";
};
build-system = [ setuptools ];
dependencies = [ coverage ];
nativeCheckInputs = [ pytestCheckHook ];
patches = [
# Add support for coverage>=7.7.0. The patch is already in `main`
# but not included in tag v2.3.0
(fetchpatch2 {
url = "https://github.com/asottile/covdefaults/commit/18fbb656ef7e90ccd2af5dbef6f100054d96c866.patch";
hash = "sha256-/MEZEztJUKuEmFmIKTrEiZYmJ4pOFLphDDl1Q+c5TN0=";
})
];
pythonImportsCheck = [ "covdefaults" ];
meta = {
description = "A coverage plugin to provide sensible default settings";
homepage = "https://github.com/asottile/covdefaults";
changelog = "https://github.com/asottile/covdefaults/commits/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ilovelinux ];
};
})