Skip to content

Commit

Permalink
Merge pull request #195656 from mweinelt/python-bcrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
mweinelt authored Oct 12, 2022
2 parents 7fc8453 + a0231e8 commit e44983d
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 2 deletions.
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 ];
};
}
4 changes: 3 additions & 1 deletion pkgs/development/python-modules/mypy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions pkgs/tools/admin/pebble/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
, nixosTests
Expand All @@ -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 ];
Expand Down
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 e44983d

Please sign in to comment.