2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
2023-02-02 18:25:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "safe-pysha3";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "1.0.4";
|
2023-02-02 18:25:31 +00:00
|
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-5CkUax7dGYssqTSiBGplZWxdMbDsiUu9YFUSf03q/xc=";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
# AttributeError: 'Keccak_224Tests' object has no attribute 'failIf'.
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests.py \
|
|
|
|
--replace "failIf" "assertFalse"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "sha3" ];
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/5afe/pysha3/releases/tag/v${version}";
|
|
|
|
description = "SHA-3 (Keccak) for Python 3.9 - 3.11";
|
|
|
|
homepage = "https://github.com/5afe/pysha3";
|
|
|
|
license = lib.licenses.psfl;
|
|
|
|
maintainers = with lib.maintainers; [ wegank ];
|
|
|
|
};
|
|
|
|
}
|