stage-2-init: fix false positives for RO Nix store mounts (#375257)
[NixPkgs.git] / pkgs / development / python-modules / bcrypt / default.nix
blob93e4a7addef2ac186ad7a31642f1c6eb058c3b08
2   lib,
3   buildPythonPackage,
4   cargo,
5   rustPlatform,
6   rustc,
7   setuptools,
8   setuptoolsRustBuildHook,
9   fetchPypi,
10   pythonOlder,
11   pytestCheckHook,
12   libiconv,
13   stdenv,
14   # for passthru.tests
15   asyncssh,
16   django_4,
17   fastapi,
18   paramiko,
19   twisted,
22 buildPythonPackage rec {
23   pname = "bcrypt";
24   version = "4.2.0";
25   format = "pyproject";
27   disabled = pythonOlder "3.6";
29   src = fetchPypi {
30     inherit pname version;
31     hash = "sha256-z2nq9Rhf1Y8mj4BbUFzjH5ufwtZLN2ZCFk6SRFQMEiE=";
32   };
34   cargoRoot = "src/_bcrypt";
35   cargoDeps = rustPlatform.fetchCargoTarball {
36     inherit src;
37     sourceRoot = "${pname}-${version}/${cargoRoot}";
38     name = "${pname}-${version}";
39     hash = "sha256-dOS9A3pTwXYkzPFFNh5emxJw7pSdDyY+mNIoHdwNdmg=";
40   };
42   nativeBuildInputs = [
43     setuptools
44     setuptoolsRustBuildHook
45     rustPlatform.cargoSetupHook
46     cargo
47     rustc
48   ];
50   # Remove when https://github.com/NixOS/nixpkgs/pull/190093 lands.
51   buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv;
53   nativeCheckInputs = [ pytestCheckHook ];
55   pythonImportsCheck = [ "bcrypt" ];
57   passthru.tests = {
58     inherit
59       asyncssh
60       django_4
61       fastapi
62       paramiko
63       twisted
64       ;
65   };
67   meta = with lib; {
68     description = "Modern password hashing for your software and your servers";
69     homepage = "https://github.com/pyca/bcrypt/";
70     license = licenses.asl20;
71     maintainers = with maintainers; [ domenkozar ];
72   };