Files
nixpkgs/pkgs/development/python-modules/cryptoparser/default.nix

67 lines
1.3 KiB
Nix

{
lib,
asn1crypto,
attrs,
buildPythonPackage,
cryptodatahub,
fetchFromGitLab,
pyfakefs,
setuptools,
setuptools-scm,
pytestCheckHook,
urllib3,
}:
buildPythonPackage (finalAttrs: {
pname = "cryptoparser";
version = "1.6.1";
pyproject = true;
src = fetchFromGitLab {
owner = "coroner";
repo = "cryptoparser";
tag = "v${finalAttrs.version}";
hash = "sha256-V2h2lQjdDorqffLyo3RV3r0G/1wAYj2sa7LfKC25wjY=";
};
build-system = [
setuptools
setuptools-scm
];
dependencies = [
asn1crypto
attrs
cryptodatahub
urllib3
];
env.PYTHONDONTWRITEBYTECODE = 1;
nativeCheckInputs = [
pyfakefs
pytestCheckHook
];
disabledTests = [
# pytest incorrectly collects abstract base classes
"TestCasesBasesHttpHeader"
];
postInstall = ''
find $out -name __pycache__ -type d | xargs rm -rv
'';
pythonImportsCheck = [ "cryptoparser" ];
passthru.updateScript = ../cryptodatahub/update.sh;
meta = {
description = "Security protocol parser and generator";
homepage = "https://gitlab.com/coroner/cryptoparser";
changelog = "https://gitlab.com/coroner/cryptoparser/-/blob/${finalAttrs.src.tag}/CHANGELOG.rst";
license = lib.licenses.mpl20;
teams = with lib.teams; [ ngi ];
};
})