1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 pkg-config, 6 rustPlatform, 7 cargo, 8 rustc, 9 bzip2, 10 nettle, 11 openssl, 12 pcsclite, 13 stdenv, 14 libiconv, 15}: 16 17buildPythonPackage rec { 18 pname = "pysequoia"; 19 version = "0.1.26"; 20 format = "pyproject"; 21 22 src = fetchPypi { 23 inherit pname version; 24 hash = "sha256-Ip4yv54e1c+zshEtLVgK5D2VcB41AzSEJHuD5t8akXI="; 25 }; 26 27 cargoDeps = rustPlatform.fetchCargoVendor { 28 inherit src; 29 name = "${pname}-${version}"; 30 hash = "sha256-vm9PpJHRznxNVtL28PBGnQcMUHwFn5uxW7Y9UufAUPg="; 31 }; 32 33 nativeBuildInputs = [ 34 pkg-config 35 rustPlatform.bindgenHook 36 rustPlatform.cargoSetupHook 37 rustPlatform.maturinBuildHook 38 cargo 39 rustc 40 ]; 41 42 buildInputs = 43 [ 44 bzip2 45 nettle 46 openssl 47 pcsclite 48 ] 49 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 50 libiconv 51 ]; 52 53 pythonImportsCheck = [ "pysequoia" ]; 54 55 meta = with lib; { 56 description = "This library provides OpenPGP facilities in Python through the Sequoia PGP library"; 57 downloadPage = "https://codeberg.org/wiktor/pysequoia"; 58 homepage = "https://sequoia-pgp.gitlab.io/pysequoia"; 59 license = licenses.asl20; 60 maintainers = with maintainers; [ doronbehar ]; 61 }; 62}