Merge pull request #211660 from dotlambda/johnnycanencrypt-0.12.0
python310Packages.johnnycanencrypt: 0.11.0 -> 0.12.0
This commit is contained in:
commit
be83a2edc0
|
@ -1,6 +1,6 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchFromGitHub
|
, fetchPypi
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
, llvmPackages
|
, llvmPackages
|
||||||
|
@ -8,36 +8,31 @@
|
||||||
, pcsclite
|
, pcsclite
|
||||||
, nettle
|
, nettle
|
||||||
, httpx
|
, httpx
|
||||||
, numpy
|
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
|
, vcrpy
|
||||||
, PCSC
|
, PCSC
|
||||||
, libiconv
|
, libiconv
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "johnnycanencrypt";
|
pname = "johnnycanencrypt";
|
||||||
version = "0.11.0";
|
version = "0.12.0";
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.8";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchPypi {
|
||||||
owner = "kushaldas";
|
inherit pname version;
|
||||||
repo = "johnnycanencrypt";
|
hash = "sha256-aGhM/uyYE7l0h6L00qp+HRUVaj7s/tnHWIHJpLAkmR4=";
|
||||||
rev = "v${version}";
|
|
||||||
hash = "sha256-YhuYejxuKZEv1xQ1fQcXSkt9I80iJOJ6MecG622JJJo=";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||||
inherit patches src;
|
inherit src;
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
hash = "sha256-r2NU1e3yeZDLOBy9pndGYM3JoH6BBKQkXMLsJR6PTRs=";
|
hash = "sha256-fcwDxkUFtA6LS77xdLktNnZJXmyl/ZzArvIW69SPpmI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
# https://github.com/kushaldas/johnnycanencrypt/issues/125
|
|
||||||
patches = [ ./Cargo.lock.patch ];
|
|
||||||
|
|
||||||
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
|
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
@ -61,31 +56,23 @@ buildPythonPackage rec {
|
||||||
libiconv
|
libiconv
|
||||||
];
|
];
|
||||||
|
|
||||||
# Needed b/c need to check AFTER python wheel is installed (using Rust Build, not buildPythonPackage)
|
checkInputs = [
|
||||||
doCheck = false;
|
|
||||||
doInstallCheck = true;
|
|
||||||
|
|
||||||
installCheckInputs = [
|
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
numpy
|
vcrpy
|
||||||
];
|
];
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
export TESTDIR=$(mktemp -d)
|
# import from $out
|
||||||
cp -r tests/ $TESTDIR
|
rm -r johnnycanencrypt
|
||||||
pushd $TESTDIR
|
|
||||||
'';
|
|
||||||
|
|
||||||
postCheck = ''
|
|
||||||
popd
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pythonImportsCheck = [ "johnnycanencrypt" ];
|
pythonImportsCheck = [ "johnnycanencrypt" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/kushaldas/johnnycanencrypt";
|
homepage = "https://github.com/kushaldas/johnnycanencrypt";
|
||||||
|
changelog = "https://github.com/kushaldas/johnnycanencrypt/blob/v${version}/changelog.md";
|
||||||
description = "Python module for OpenPGP written in Rust";
|
description = "Python module for OpenPGP written in Rust";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.lgpl3Plus;
|
||||||
maintainers = with maintainers; [ _0x4A6F ];
|
maintainers = with maintainers; [ _0x4A6F ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue