18 buildPythonPackage rec {
19 pname = "johnnycanencrypt";
21 disabled = pythonOlder "3.7";
23 src = fetchFromGitHub {
25 repo = "johnnycanencrypt";
27 sha256 = "192wfrlyylrpzq70yki421mi1smk8q2cyki2a1d03q7h6apib3j4";
30 cargoDeps = rustPlatform.fetchCargoTarball {
32 name = "${pname}-${version}";
33 hash = "sha256-2XhXCKyXVlFgbcOoMy/A5ajiIVxBii56YeI29mO720U=";
38 patches = [ ./Cargo.lock.patch ];
40 cargoSha256 = "0ifvpdizcdp2c5x2x2j1bhhy5a75q0pk7a63dmh52mlpmh45fy6r";
42 LIBCLANG_PATH = llvmPackages.libclang + "/lib";
44 propagatedBuildInputs = [
52 ] ++ (with rustPlatform; [
60 ] ++ lib.optionals stdenv.isDarwin [ PCSC ];
62 # Needed b/c need to check AFTER python wheel is installed (using Rust Build, not buildPythonPackage)
64 doInstallCheck = true;
66 installCheckInputs = [
71 # Remove with the next release after 0.5.0. This change is required
72 # for compatibility with maturin 0.9.0.
74 sed '/project-url = /d' -i Cargo.toml
78 export TESTDIR=$(mktemp -d)
87 pythonImportsCheck = [ "johnnycanencrypt" ];
90 homepage = "https://github.com/kushaldas/johnnycanencrypt";
91 description = "Python module for OpenPGP written in Rust";
92 license = licenses.gpl3Plus;
93 maintainers = with maintainers; [ _0x4A6F ];