From 7d3e7f48903918cc8b1f102e3a2602114fba357e Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 12 Oct 2022 12:15:10 +0200 Subject: [PATCH 1/3] python3Packages.bcrypt: Revert to 3.2.2 on i686-linux 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: https://github.com/pyca/bcrypt/issues/407 --- pkgs/development/python-modules/bcrypt/3.nix | 51 ++++++++++++++++++++ pkgs/top-level/python-packages.nix | 5 +- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/bcrypt/3.nix diff --git a/pkgs/development/python-modules/bcrypt/3.nix b/pkgs/development/python-modules/bcrypt/3.nix new file mode 100644 index 000000000000..2f242faac86d --- /dev/null +++ b/pkgs/development/python-modules/bcrypt/3.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 077d3fda6796..47928f1cc222 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -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 { }; From 0310ac43a5b29b5aad8dd8bc0a9adfc4da8d8dd6 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 12 Oct 2022 13:00:01 +0200 Subject: [PATCH 2/3] python3Packages.mypy: Disable mypy.report import on i686-linux Importing the mypy.report fails due to a circular import. --- pkgs/development/python-modules/mypy/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/mypy/default.nix b/pkgs/development/python-modules/mypy/default.nix index 3e58b91b1600..b664d871fb55 100644 --- a/pkgs/development/python-modules/mypy/default.nix +++ b/pkgs/development/python-modules/mypy/default.nix @@ -63,10 +63,12 @@ buildPythonPackage rec { "mypy" "mypy.api" "mypy.fastparse" - "mypy.report" "mypy.types" "mypyc" "mypyc.analysis" + ] ++ lib.optionals (!stdenv.hostPlatform.isi686) [ + # ImportError: cannot import name 'map_instance_to_supertype' from partially initialized module 'mypy.maptype' (most likely due to a circular import) + "mypy.report" ]; # Compile mypy with mypyc, which makes mypy about 4 times faster. The compiled From a0231e8ccebfadfc742a9da51cc14c375eeeb682 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 12 Oct 2022 13:11:54 +0200 Subject: [PATCH 3/3] pebble: mark broken on 32bit platforms --- pkgs/tools/admin/pebble/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/tools/admin/pebble/default.nix b/pkgs/tools/admin/pebble/default.nix index 8fc32a2e4e76..a3c8d20b107f 100644 --- a/pkgs/tools/admin/pebble/default.nix +++ b/pkgs/tools/admin/pebble/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildGoModule , fetchFromGitHub , nixosTests @@ -22,6 +23,8 @@ buildGoModule rec { }; meta = { + # ca/ca.go:374:67: 9223372038 (untyped int constant) overflows uint + broken = stdenv.hostPlatform.is32bit; homepage = "https://github.com/letsencrypt/pebble"; description = "A miniature version of Boulder, Pebble is a small RFC 8555 ACME test server not suited for a production CA"; license = [ lib.licenses.mpl20 ];