Skip to content

Commit

Permalink
python312Packages.pgpy: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Bot-wxt1221 committed Dec 27, 2024
1 parent b4a0008 commit 53e437d
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions pkgs/development/python-modules/pgpy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
pyasn1,
cryptography,
pytestCheckHook,
standard-imghdr,
}:

buildPythonPackage rec {
Expand All @@ -15,7 +16,7 @@ buildPythonPackage rec {

disabled = pythonOlder "3.6";

format = "pyproject";
pyproject = true;

src = fetchFromGitHub {
owner = "SecurityInnovation";
Expand All @@ -24,24 +25,33 @@ buildPythonPackage rec {
hash = "sha256-47YiHNxmjyCOYHHUV3Zyhs3Att9HZtCXYfbN34ooTxU=";
};

nativeBuildInputs = [ setuptools ];
build-system = [ setuptools ];

propagatedBuildInputs = [
pyasn1
cryptography
];
dependencies =
[
pyasn1
cryptography
]
++ lib.optionals (!pythonOlder "3.13") [
standard-imghdr
];

postPatch = ''
substituteInPlace tests/test_10_exceptions.py \ # https://github.com/SecurityInnovation/PGPy/issues/472
--replace-fail ", 512" ", 1024" # We need longer test key because pgp deprecated length=512
'';

nativeCheckInputs = [ pytestCheckHook ];

meta = with lib; {
meta = {
homepage = "https://github.com/SecurityInnovation/PGPy";
description = "Pretty Good Privacy for Python";
longDescription = ''
PGPy is a Python library for implementing Pretty Good Privacy into Python
programs, conforming to the OpenPGP specification per RFC 4880.
'';
license = licenses.bsd3;
maintainers = with maintainers; [
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
eadwu
dotlambda
];
Expand Down

0 comments on commit 53e437d

Please sign in to comment.