nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 60 lines 1.4 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonPackage, 5 setuptools, 6 pyasn1, 7 cryptography, 8 pytestCheckHook, 9}: 10 11buildPythonPackage rec { 12 pname = "pgpy"; 13 version = "0.6.0"; 14 15 pyproject = true; 16 17 src = fetchFromGitHub { 18 owner = "SecurityInnovation"; 19 repo = "PGPy"; 20 rev = "v${version}"; 21 hash = "sha256-47YiHNxmjyCOYHHUV3Zyhs3Att9HZtCXYfbN34ooTxU="; 22 }; 23 24 build-system = [ setuptools ]; 25 26 dependencies = [ 27 pyasn1 28 cryptography 29 ]; 30 31 patches = [ 32 # https://github.com/SecurityInnovation/PGPy/issues/462 33 ./pr-443.patch 34 35 # https://github.com/SecurityInnovation/PGPy/pull/474 36 ./Fix-compat-with-current-cryptography.patch 37 ]; 38 39 postPatch = '' 40 # https://github.com/SecurityInnovation/PGPy/issues/472 41 substituteInPlace tests/test_10_exceptions.py \ 42 --replace-fail ", 512" ", 1024" # We need longer test key because pgp deprecated length=512 43 ''; 44 45 nativeCheckInputs = [ pytestCheckHook ]; 46 47 meta = { 48 homepage = "https://github.com/SecurityInnovation/PGPy"; 49 description = "Pretty Good Privacy for Python"; 50 longDescription = '' 51 PGPy is a Python library for implementing Pretty Good Privacy into Python 52 programs, conforming to the OpenPGP specification per RFC 4880. 53 ''; 54 license = lib.licenses.bsd3; 55 maintainers = with lib.maintainers; [ 56 eadwu 57 dotlambda 58 ]; 59 }; 60}