Merge pull request #195656 from mweinelt/python-bcrypt

This commit is contained in:
Martin Weinelt 2022-10-12 14:34:47 +02:00 committed by GitHub
commit e44983d587
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 61 additions and 2 deletions

View file

@ -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 ];
};
}

View file

@ -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

View file

@ -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 ];

View file

@ -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 { };