Skip to content

Commit

Permalink
Merge pull request #317197 from natsukium/hkdf
Browse files Browse the repository at this point in the history
python311Packages.hkdf: refactor and remove nose
  • Loading branch information
natsukium authored Jul 4, 2024
2 parents 181a5c0 + b3b929f commit fc20cc3
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions pkgs/development/python-modules/hkdf/default.nix
Original file line number Diff line number Diff line change
@@ -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 = ''
runHook preCheck
nosetests
'';
# no tests in PyPI tarball
doCheck = false;
runHook postCheck
'';

meta = with lib; {
description = "HMAC-based Extract-and-Expand Key Derivation Function (HKDF)";
Expand Down

0 comments on commit fc20cc3

Please sign in to comment.