1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 nose,
6 setuptools,
7}:
8
9buildPythonPackage {
10 pname = "hkdf";
11 version = "0.0.3";
12 pyproject = true;
13
14 src = fetchFromGitHub {
15 owner = "casebeer";
16 repo = "python-hkdf";
17 rev = "cc3c9dbf0a271b27a7ac5cd04cc1485bbc3b4307";
18 hash = "sha256-i3vJzUI7dpZbgZkz7Agd5RAeWisNWftdk/mkJBZkkLg=";
19 };
20
21 build-system = [ setuptools ];
22
23 pythonImportsCheck = [ "hkdf" ];
24
25 nativeCheckInputs = [ nose ];
26
27 checkPhase = ''
28 runHook preCheck
29
30 nosetests
31
32 runHook postCheck
33 '';
34
35 meta = with lib; {
36 description = "HMAC-based Extract-and-Expand Key Derivation Function (HKDF)";
37 homepage = "https://github.com/casebeer/python-hkdf";
38 license = licenses.bsd2;
39 };
40}