diff --git a/pkgs/development/python-modules/argon2-cffi-bindings/default.nix b/pkgs/development/python-modules/argon2-cffi-bindings/default.nix index 3f1f3f86666c..77182cbd6a43 100644 --- a/pkgs/development/python-modules/argon2-cffi-bindings/default.nix +++ b/pkgs/development/python-modules/argon2-cffi-bindings/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, libargon2 , cffi , setuptools-scm }: @@ -14,14 +15,19 @@ buildPythonPackage rec { sha256 = "bb89ceffa6c791807d1305ceb77dbfacc5aa499891d2c55661c6459651fc39e3"; }; + buildInputs = [ libargon2 ]; + nativeBuildInputs = [ setuptools-scm + cffi ]; propagatedBuildInputs = [ cffi ]; + env.ARGON2_CFFI_USE_SYSTEM = 1; + # tarball doesn't include tests, but the upstream tests are minimal doCheck = false; pythonImportsCheck = [ "_argon2_cffi_bindings" ]; diff --git a/pkgs/development/python-modules/argon2-cffi/default.nix b/pkgs/development/python-modules/argon2-cffi/default.nix index 2282a06e5c64..da9022c93f19 100644 --- a/pkgs/development/python-modules/argon2-cffi/default.nix +++ b/pkgs/development/python-modules/argon2-cffi/default.nix @@ -1,46 +1,32 @@ -{ cffi -, six -, enum34 -, hypothesis -, pytest -, wheel +{ hypothesis +, pytestCheckHook , buildPythonPackage , fetchPypi -, flit-core -, isPy3k , lib -, stdenv +, hatchling +, hatch-vcs +, hatch-fancy-pypi-readme , argon2-cffi-bindings }: buildPythonPackage rec { pname = "argon2-cffi"; - version = "21.3.0"; + version = "23.1.0"; format = "pyproject"; src = fetchPypi { - inherit pname version; - sha256 = "d384164d944190a7dd7ef22c6aa3ff197da12962bd04b17f64d4e93d934dba5b"; + pname = "argon2_cffi"; + inherit version; + hash = "sha256-h5w+eaJynOdo67fTbUYJ46eKTKLsOp8SKGygV+PQ2wg="; }; - nativeBuildInputs = [ - flit-core - ]; + nativeBuildInputs = [ hatchling hatch-vcs hatch-fancy-pypi-readme ]; - propagatedBuildInputs = [ cffi six argon2-cffi-bindings ] - ++ lib.optional (!isPy3k) enum34; + propagatedBuildInputs = [ argon2-cffi-bindings ]; - propagatedNativeBuildInputs = [ - argon2-cffi-bindings - cffi - ]; + nativeCheckInputs = [ hypothesis pytestCheckHook ]; - ARGON2_CFFI_USE_SSE2 = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) "0"; - - nativeCheckInputs = [ hypothesis pytest wheel ]; - checkPhase = '' - pytest tests - ''; + pythonImportsCheck = [ "argon2" ]; meta = with lib; { description = "Secure Password Hashes for Python";