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 acb752d commit 0646c13
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 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,31 @@ buildPythonPackage rec {
hash = "sha256-47YiHNxmjyCOYHHUV3Zyhs3Att9HZtCXYfbN34ooTxU=";
};

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

propagatedBuildInputs = [
dependencies = [
pyasn1
cryptography
standard-imghdr
];

postPatch = ''
# https://github.com/SecurityInnovation/PGPy/issues/472
substituteInPlace tests/test_10_exceptions.py \
--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 0646c13

Please sign in to comment.