nixpkgs/pkgs/development/python-modules/pgpy/default.nix
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

60 lines
1.3 KiB
Nix

{
lib,
fetchFromGitHub,
buildPythonPackage,
setuptools,
pyasn1,
cryptography,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "pgpy";
version = "0.6.0";
pyproject = true;
src = fetchFromGitHub {
owner = "SecurityInnovation";
repo = "PGPy";
rev = "v${version}";
hash = "sha256-47YiHNxmjyCOYHHUV3Zyhs3Att9HZtCXYfbN34ooTxU=";
};
build-system = [ setuptools ];
dependencies = [
pyasn1
cryptography
];
patches = [
# https://github.com/SecurityInnovation/PGPy/issues/462
./pr-443.patch
# https://github.com/SecurityInnovation/PGPy/pull/474
./Fix-compat-with-current-cryptography.patch
];
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 = {
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 = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
eadwu
dotlambda
];
};
}