nixpkgs/pkgs/development/python-modules/certvalidator/default.nix
Ihar Hrachyshka 567e8dfd8e
treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

42 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
asn1crypto,
oscrypto,
cacert,
}:
buildPythonPackage rec {
pname = "certvalidator";
version = "0.11.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "wbond";
repo = "certvalidator";
rev = version;
hash = "sha256-yVF7t4FuU3C9fDg67JeM7LWZZh/mv5F4EKmjlO4AuBY=";
};
propagatedBuildInputs = [
asn1crypto
oscrypto
];
nativeCheckInputs = [ cacert ];
checkPhase = ''
# Tests are run with a custom executor/loader
# The regex to skip specific tests relies on negative lookahead of regular expressions
# We're skipping the few tests that rely on the network, fetching CRLs, OCSP or remote certificates
python -c 'import dev.tests; dev.tests.run("^(?!.*test_(basic_certificate_validator_tls|fetch|revocation|build_path)).*$")'
'';
pythonImportsCheck = [ "certvalidator" ];
meta = {
homepage = "https://github.com/wbond/certvalidator";
description = "Validates X.509 certificates and paths";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ baloo ];
};
}