Merge pull request #317197 from natsukium/hkdf

python311Packages.hkdf: refactor and remove nose
This commit is contained in:
OTABI Tomoya 2024-07-04 13:36:40 +09:00 committed by GitHub
commit fc20cc393c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,28 +1,36 @@
{
lib,
buildPythonPackage,
fetchPypi,
nose,
fetchFromGitHub,
pynose,
setuptools,
}:
buildPythonPackage rec {
buildPythonPackage {
pname = "hkdf";
version = "0.0.3";
format = "setuptools";
pyproject = true;
src = fetchPypi {
inherit pname version;
sha256 = "1jhxk5vhxmxxjp3zj526ry521v9inzzl8jqaaf0ma65w6k332ak2";
src = fetchFromGitHub {
owner = "casebeer";
repo = "python-hkdf";
rev = "cc3c9dbf0a271b27a7ac5cd04cc1485bbc3b4307";
hash = "sha256-i3vJzUI7dpZbgZkz7Agd5RAeWisNWftdk/mkJBZkkLg=";
};
nativeCheckInputs = [ nose ];
build-system = [ setuptools ];
pythonImportsCheck = [ "hkdf" ];
nativeCheckInputs = [ pynose ];
checkPhase = ''
nosetests
'';
runHook preCheck
# no tests in PyPI tarball
doCheck = false;
nosetests
runHook postCheck
'';
meta = with lib; {
description = "HMAC-based Extract-and-Expand Key Derivation Function (HKDF)";