Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 fetchpatch2, 6 setuptools, 7 hkdf, 8 pytestCheckHook, 9}: 10 11buildPythonPackage rec { 12 pname = "spake2"; 13 version = "0.8"; 14 pyproject = true; 15 16 src = fetchPypi { 17 inherit pname version; 18 sha256 = "c17a614b29ee4126206e22181f70a406c618d3c6c62ca6d6779bce95e9c926f4"; 19 }; 20 21 patches = [ 22 # https://github.com/warner/python-spake2/pull/16 23 (fetchpatch2 { 24 name = "python312-compat.patch"; 25 url = "https://github.com/warner/python-spake2/commit/1b04d33106b105207c97c64b2589c45790720b0b.patch"; 26 hash = "sha256-OoBz0lN17VyVGg6UfT+Zj9M1faFTNpPIhxrwCgUwMc8="; 27 }) 28 ]; 29 30 nativeBuildInputs = [ setuptools ]; 31 32 propagatedBuildInputs = [ hkdf ]; 33 34 pythonImportsCheck = [ "spake2" ]; 35 36 nativeCheckInputs = [ pytestCheckHook ]; 37 38 meta = with lib; { 39 changelog = "https://github.com/warner/python-spake2/blob/v${version}/NEWS"; 40 description = "SPAKE2 password-authenticated key exchange library"; 41 homepage = "https://github.com/warner/python-spake2"; 42 license = licenses.mit; 43 maintainers = with maintainers; [ dotlambda ]; 44 }; 45}