1{ cffi 2, six 3, enum34 4, hypothesis 5, pytest 6, wheel 7, buildPythonPackage 8, fetchPypi 9, isPy3k 10, lib 11, stdenv 12}: 13 14buildPythonPackage rec { 15 pname = "argon2_cffi"; 16 version = "21.1.0"; 17 18 src = fetchPypi { 19 pname = "argon2-cffi"; 20 inherit version; 21 sha256 = "sha256-9xC2EQPRofaSyj7L0Tc+KKpeVFrGJboGf/L+yhsruHA="; 22 }; 23 24 propagatedBuildInputs = [ cffi six ] ++ lib.optional (!isPy3k) enum34; 25 26 propagatedNativeBuildInputs = [ cffi ]; 27 28 ARGON2_CFFI_USE_SSE2 = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) "0"; 29 30 checkInputs = [ hypothesis pytest wheel ]; 31 checkPhase = '' 32 pytest tests 33 ''; 34 35 meta = with lib; { 36 description = "Secure Password Hashes for Python"; 37 homepage = "https://argon2-cffi.readthedocs.io/"; 38 license = licenses.mit; 39 }; 40}