Skip to content

Commit

Permalink
python3Packages.bcrypt: Revert to 3.2.2 on i686-linux
Browse files Browse the repository at this point in the history
The latest bcrypt version segfaults during test_kdf, which prevents the
package from building. The package is in the critical chain for many
NixOS tests, which currently won't complete on i686-linux.

Upstream-Issue: pyca/bcrypt#407
  • Loading branch information
mweinelt committed Oct 12, 2022
1 parent bf43ec1 commit 7d3e7f4
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
51 changes: 51 additions & 0 deletions pkgs/development/python-modules/bcrypt/3.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{ lib
, buildPythonPackage
, setuptools
, isPyPy
, fetchPypi
, pythonOlder
, cffi
, pytestCheckHook
, six
}:

buildPythonPackage rec {
pname = "bcrypt";
version = "3.2.2";
format = "pyproject";

disabled = pythonOlder "3.6";

src = fetchPypi {
inherit pname version;
hash = "sha256-QzxBDCF3BXcF2iqfLNAd0VdJOyp6wUyFk6FrPatra/s=";
};

nativeBuildInputs = [
setuptools
];

propagatedBuildInputs = [
six
cffi
];

propagatedNativeBuildInputs = [
cffi
];

checkInputs = [
pytestCheckHook
];

pythonImportsCheck = [
"bcrypt"
];

meta = with lib; {
description = "Modern password hashing for your software and your servers";
homepage = "https://github.com/pyca/bcrypt/";
license = licenses.asl20;
maintainers = with maintainers; [ domenkozar ];
};
}
5 changes: 4 additions & 1 deletion pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,10 @@ in {

bcdoc = callPackage ../development/python-modules/bcdoc { };

bcrypt = callPackage ../development/python-modules/bcrypt { };
bcrypt = if stdenv.hostPlatform.system == "i686-linux" then
callPackage ../development/python-modules/bcrypt/3.nix { }
else
callPackage ../development/python-modules/bcrypt { };

beaker = callPackage ../development/python-modules/beaker { };

Expand Down

0 comments on commit 7d3e7f4

Please sign in to comment.