nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 44 lines 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 flask, 6 bcrypt, 7 unittestCheckHook, 8}: 9 10buildPythonPackage rec { 11 pname = "flask-bcrypt"; 12 version = "1.0.1"; 13 format = "setuptools"; 14 15 src = fetchFromGitHub { 16 owner = "maxcountryman"; 17 repo = "flask-bcrypt"; 18 rev = version; 19 hash = "sha256-WlIholi/nzq6Ikc0LS6FhG0Q5Kz0kvvAlA2YJ7EksZ4="; 20 }; 21 22 postPatch = '' 23 # Backport fix for test_long_password from upstream PR: https://github.com/maxcountryman/flask-bcrypt/pull/96 24 substituteInPlace test_bcrypt.py \ 25 --replace-fail "self.assertTrue(self.bcrypt.check_password_hash(pw_hash, 'A' * 80))" \ 26 "self.assertTrue(self.bcrypt.check_password_hash(pw_hash, 'A' * 72))" 27 ''; 28 29 propagatedBuildInputs = [ 30 flask 31 bcrypt 32 ]; 33 34 nativeCheckInputs = [ unittestCheckHook ]; 35 36 pythonImportsCheck = [ "flask_bcrypt" ]; 37 38 meta = { 39 description = "Brcrypt hashing for Flask"; 40 homepage = "https://github.com/maxcountryman/flask-bcrypt"; 41 license = lib.licenses.bsd3; 42 maintainers = [ ]; 43 }; 44}