Commit 7852ff5b authored by Robert Schütz's avatar Robert Schütz
Browse files

python310Packages.johnnycanencrypt: 0.6.0 -> 0.11.0

parent 5608b9be
Loading
Loading
Loading
Loading
+668 −406

File changed.

Preview size limit exceeded, changes collapsed.

+8 −17
Original line number Diff line number Diff line
@@ -7,8 +7,7 @@
, pkg-config
, pcsclite
, nettle
, requests
, vcrpy
, httpx
, numpy
, pytestCheckHook
, pythonOlder
@@ -18,31 +17,31 @@

buildPythonPackage rec {
  pname = "johnnycanencrypt";
  version = "0.6.0";
  version = "0.11.0";
  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "kushaldas";
    repo = "johnnycanencrypt";
    rev = "v${version}";
    sha256 = "0b1yfddf38dicmjgnw9mk5g0iisa5yq6l9cj6kfskhyrznasvz3g";
    hash = "sha256-YhuYejxuKZEv1xQ1fQcXSkt9I80iJOJ6MecG622JJJo=";
  };

  cargoDeps = rustPlatform.fetchCargoTarball {
    inherit patches src;
    name = "${pname}-${version}";
    hash = "sha256-1dRFC59GY7M99LvQWy2eXPesmLX5k46rN8l4suLYkQY=";
    hash = "sha256-r2NU1e3yeZDLOBy9pndGYM3JoH6BBKQkXMLsJR6PTRs=";
  };

  format = "pyproject";

  # https://github.com/kushaldas/johnnycanencrypt/issues/125
  patches = [ ./Cargo.lock.patch ];

  LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";

  propagatedBuildInputs = [
    requests
    vcrpy
    httpx
  ];

  nativeBuildInputs = [
@@ -54,8 +53,9 @@ buildPythonPackage rec {
  ]);

  buildInputs = [
    pcsclite
    nettle
  ] ++ lib.optionals stdenv.isLinux [
    pcsclite
  ] ++ lib.optionals stdenv.isDarwin [
    PCSC
    libiconv
@@ -70,14 +70,6 @@ buildPythonPackage rec {
    numpy
  ];

  # Remove with the next release after 0.5.0. This change is required
  # for compatibility with maturin 0.9.0.
  postPatch = ''
    sed '/project-url = /d' -i Cargo.toml
    substituteInPlace pyproject.toml \
      --replace 'manylinux = "off"' 'skip-auditwheel = true'
  '';

  preCheck = ''
    export TESTDIR=$(mktemp -d)
    cp -r tests/ $TESTDIR
@@ -91,7 +83,6 @@ buildPythonPackage rec {
  pythonImportsCheck = [ "johnnycanencrypt" ];

  meta = with lib; {
    broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
    homepage = "https://github.com/kushaldas/johnnycanencrypt";
    description = "Python module for OpenPGP written in Rust";
    license = licenses.gpl3Plus;