nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 74 lines 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 cargo, 5 rustPlatform, 6 rustc, 7 setuptools, 8 setuptools-rust, 9 fetchFromGitHub, 10 pytestCheckHook, 11 # for passthru.tests 12 asyncssh, 13 django_4, 14 fastapi, 15 paramiko, 16 twisted, 17}: 18 19buildPythonPackage rec { 20 pname = "bcrypt"; 21 version = "5.0.0"; 22 pyproject = true; 23 24 src = fetchFromGitHub { 25 owner = "pyca"; 26 repo = "bcrypt"; 27 tag = version; 28 hash = "sha256-7Dp07xoq6h+fiP7d7/TRRoYszWsyQF1c4vuFUpZ7u6U="; 29 }; 30 31 cargoRoot = "src/_bcrypt"; 32 cargoDeps = rustPlatform.fetchCargoVendor { 33 inherit 34 pname 35 version 36 src 37 cargoRoot 38 ; 39 hash = "sha256-hYMJlwxnXA0ZOJiyZ8rDp9govVcc1SGkDfqUVngnUPQ="; 40 }; 41 42 build-system = [ 43 setuptools 44 setuptools-rust 45 ]; 46 47 nativeBuildInputs = [ 48 rustPlatform.cargoSetupHook 49 cargo 50 rustc 51 ]; 52 53 nativeCheckInputs = [ pytestCheckHook ]; 54 55 pythonImportsCheck = [ "bcrypt" ]; 56 57 passthru.tests = { 58 inherit 59 asyncssh 60 django_4 61 fastapi 62 paramiko 63 twisted 64 ; 65 }; 66 67 meta = { 68 changelog = "https://github.com/pyca/bcrypt/blob/${src.tag}/CHANGELOG.rst"; 69 description = "Modern password hashing for your software and your servers"; 70 homepage = "https://github.com/pyca/bcrypt/"; 71 license = lib.licenses.asl20; 72 maintainers = [ lib.maintainers.dotlambda ]; 73 }; 74}