19 buildPythonPackage rec {
20 pname = "johnnycanencrypt";
22 disabled = pythonOlder "3.7";
24 src = fetchFromGitHub {
26 repo = "johnnycanencrypt";
28 sha256 = "0b1yfddf38dicmjgnw9mk5g0iisa5yq6l9cj6kfskhyrznasvz3g";
31 cargoDeps = rustPlatform.fetchCargoTarball {
33 name = "${pname}-${version}";
34 hash = "sha256-1dRFC59GY7M99LvQWy2eXPesmLX5k46rN8l4suLYkQY=";
39 patches = [ ./Cargo.lock.patch ];
41 LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
43 propagatedBuildInputs = [
51 ] ++ (with rustPlatform; [
59 ] ++ lib.optionals stdenv.isDarwin [
64 # Needed b/c need to check AFTER python wheel is installed (using Rust Build, not buildPythonPackage)
66 doInstallCheck = true;
68 installCheckInputs = [
73 # Remove with the next release after 0.5.0. This change is required
74 # for compatibility with maturin 0.9.0.
76 sed '/project-url = /d' -i Cargo.toml
77 substituteInPlace pyproject.toml \
78 --replace 'manylinux = "off"' 'skip-auditwheel = true'
82 export TESTDIR=$(mktemp -d)
91 pythonImportsCheck = [ "johnnycanencrypt" ];
94 broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
95 homepage = "https://github.com/kushaldas/johnnycanencrypt";
96 description = "Python module for OpenPGP written in Rust";
97 license = licenses.gpl3Plus;
98 maintainers = with maintainers; [ _0x4A6F ];