From 375da609d8cf5958440b45bfc37eea2e294709ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 1 Oct 2025 14:54:26 -0700 Subject: [PATCH 1/3] python3Packages.bcrypt: 4.3.0 -> 5.0.0 Diff: https://github.com/pyca/bcrypt/compare/4.3.0...5.0.0 Changelog: https://github.com/pyca/bcrypt/blob/5.0.0/README.rst#changelog --- .../python-modules/bcrypt/default.nix | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/pkgs/development/python-modules/bcrypt/default.nix b/pkgs/development/python-modules/bcrypt/default.nix index e900f539fc97..3c279c73bff7 100644 --- a/pkgs/development/python-modules/bcrypt/default.nix +++ b/pkgs/development/python-modules/bcrypt/default.nix @@ -5,12 +5,9 @@ rustPlatform, rustc, setuptools, - setuptoolsRustBuildHook, - fetchPypi, - pythonOlder, + setuptools-rust, + fetchFromGitHub, pytestCheckHook, - libiconv, - stdenv, # for passthru.tests asyncssh, django_4, @@ -21,14 +18,14 @@ buildPythonPackage rec { pname = "bcrypt"; - version = "4.3.0"; - format = "pyproject"; + version = "5.0.0"; + pyproject = true; - disabled = pythonOlder "3.6"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-Oj/SIEF4ttKtzwnLT2Qm/+9UdiV3p8m1TBWQCMsojBg="; + src = fetchFromGitHub { + owner = "pyca"; + repo = "bcrypt"; + tag = version; + hash = "sha256-7Dp07xoq6h+fiP7d7/TRRoYszWsyQF1c4vuFUpZ7u6U="; }; cargoRoot = "src/_bcrypt"; @@ -39,20 +36,20 @@ buildPythonPackage rec { src cargoRoot ; - hash = "sha256-HgHvfMBspPsSYhllnKBg5XZB6zxFIqJj+4//xKG8HwA="; + hash = "sha256-hYMJlwxnXA0ZOJiyZ8rDp9govVcc1SGkDfqUVngnUPQ="; }; - nativeBuildInputs = [ + build-system = [ setuptools - setuptoolsRustBuildHook + setuptools-rust + ]; + + nativeBuildInputs = [ rustPlatform.cargoSetupHook cargo rustc ]; - # Remove when https://github.com/NixOS/nixpkgs/pull/190093 lands. - buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; - nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "bcrypt" ]; @@ -67,10 +64,11 @@ buildPythonPackage rec { ; }; - meta = with lib; { + meta = { + changelog = "https://github.com/pyca/bcrypt/blob/${src.tag}/CHANGELOG.rst"; description = "Modern password hashing for your software and your servers"; homepage = "https://github.com/pyca/bcrypt/"; - license = licenses.asl20; + license = lib.licenses.asl20; maintainers = [ ]; }; } From 1bbe4fe35d6b5736e0dba5c5cf8acb7881e922c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 1 Oct 2025 15:09:26 -0700 Subject: [PATCH 2/3] python3Packages.bcrypt: add dotlambda to maintainers --- pkgs/development/python-modules/bcrypt/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/bcrypt/default.nix b/pkgs/development/python-modules/bcrypt/default.nix index 3c279c73bff7..b50cb3faef22 100644 --- a/pkgs/development/python-modules/bcrypt/default.nix +++ b/pkgs/development/python-modules/bcrypt/default.nix @@ -69,6 +69,6 @@ buildPythonPackage rec { description = "Modern password hashing for your software and your servers"; homepage = "https://github.com/pyca/bcrypt/"; license = lib.licenses.asl20; - maintainers = [ ]; + maintainers = [ lib.maintainers.dotlambda ]; }; } From a8fc9df4d3ee8ecb83a2d54337d74d8bee415002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 9 Oct 2025 13:05:09 -0700 Subject: [PATCH 3/3] python3Packages.libpass: skip tests broken by bcrypt 5.0.0 --- pkgs/development/python-modules/libpass/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/libpass/default.nix b/pkgs/development/python-modules/libpass/default.nix index baffb02b134e..5f02a27cc3a3 100644 --- a/pkgs/development/python-modules/libpass/default.nix +++ b/pkgs/development/python-modules/libpass/default.nix @@ -41,6 +41,15 @@ buildPythonPackage rec { pythonImportsCheck = [ "passlib" ]; + disabledTestPaths = [ + # https://github.com/notypecheck/passlib/issues/18 + "tests/test_handlers_bcrypt.py::bcrypt_bcrypt_test::test_70_hashes" + "tests/test_handlers_bcrypt.py::bcrypt_bcrypt_test::test_77_fuzz_input" + "tests/test_handlers_django.py::django_bcrypt_test::test_77_fuzz_input" + "tests/test_handlers_bcrypt.py::bcrypt_bcrypt_test::test_secret_w_truncate_size" + "tests/test_handlers_django.py::django_bcrypt_test::test_secret_w_truncate_size" + ]; + disabledTests = [ # timming sensitive "test_dummy_verify"