mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-14 08:26:37 +01:00
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
44 lines
1 KiB
Nix
44 lines
1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
flask,
|
|
bcrypt,
|
|
unittestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "flask-bcrypt";
|
|
version = "1.0.1";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "maxcountryman";
|
|
repo = "flask-bcrypt";
|
|
rev = version;
|
|
hash = "sha256-WlIholi/nzq6Ikc0LS6FhG0Q5Kz0kvvAlA2YJ7EksZ4=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# Backport fix for test_long_password from upstream PR: https://github.com/maxcountryman/flask-bcrypt/pull/96
|
|
substituteInPlace test_bcrypt.py \
|
|
--replace-fail "self.assertTrue(self.bcrypt.check_password_hash(pw_hash, 'A' * 80))" \
|
|
"self.assertTrue(self.bcrypt.check_password_hash(pw_hash, 'A' * 72))"
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
flask
|
|
bcrypt
|
|
];
|
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
|
|
|
pythonImportsCheck = [ "flask_bcrypt" ];
|
|
|
|
meta = {
|
|
description = "Brcrypt hashing for Flask";
|
|
homepage = "https://github.com/maxcountryman/flask-bcrypt";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = [ ];
|
|
};
|
|
}
|