2020-04-24 23:36:52 +00:00
|
|
|
{ cffi
|
|
|
|
, six
|
|
|
|
, enum34
|
|
|
|
, hypothesis
|
|
|
|
, pytest
|
|
|
|
, wheel
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
|
|
|
, lib
|
2021-12-06 16:07:01 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "argon2_cffi";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "21.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "argon2-cffi";
|
|
|
|
inherit version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-9xC2EQPRofaSyj7L0Tc+KKpeVFrGJboGf/L+yhsruHA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ cffi six ] ++ lib.optional (!isPy3k) enum34;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
propagatedNativeBuildInputs = [ cffi ];
|
|
|
|
|
|
|
|
ARGON2_CFFI_USE_SSE2 = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) "0";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkInputs = [ hypothesis pytest wheel ];
|
|
|
|
checkPhase = ''
|
|
|
|
pytest tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Secure Password Hashes for Python";
|
|
|
|
homepage = "https://argon2-cffi.readthedocs.io/";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|