2020-04-24 23:36:52 +00:00
|
|
|
{ cffi
|
|
|
|
, six
|
|
|
|
, enum34
|
|
|
|
, hypothesis
|
|
|
|
, pytest
|
|
|
|
, wheel
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-10-09 19:29:22 +00:00
|
|
|
, flit-core
|
2020-04-24 23:36:52 +00:00
|
|
|
, isPy3k
|
|
|
|
, lib
|
2021-12-06 16:07:01 +00:00
|
|
|
, stdenv
|
2022-02-10 20:34:41 +00:00
|
|
|
, argon2-cffi-bindings
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-05-18 14:49:53 +00:00
|
|
|
pname = "argon2-cffi";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "21.3.0";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2022-05-18 14:49:53 +00:00
|
|
|
inherit pname version;
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "d384164d944190a7dd7ef22c6aa3ff197da12962bd04b17f64d4e93d934dba5b";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
flit-core
|
|
|
|
];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
propagatedBuildInputs = [ cffi six argon2-cffi-bindings ]
|
|
|
|
++ lib.optional (!isPy3k) enum34;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
propagatedNativeBuildInputs = [
|
|
|
|
argon2-cffi-bindings
|
|
|
|
cffi
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
ARGON2_CFFI_USE_SSE2 = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) "0";
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ hypothesis pytest wheel ];
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
|
|
|
pytest tests
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Secure Password Hashes for Python";
|
|
|
|
homepage = "https://argon2-cffi.readthedocs.io/";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|