1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 fetchpatch2,
6 pytestCheckHook,
7 sphinxHook,
8 pythonOlder,
9 libsodium,
10 cffi,
11 hypothesis,
12}:
13
14buildPythonPackage rec {
15 pname = "pynacl";
16 version = "1.5.0";
17 outputs = [
18 "out"
19 "doc"
20 ];
21 format = "setuptools";
22
23 disabled = pythonOlder "3.6";
24
25 src = fetchPypi {
26 inherit version;
27 pname = "PyNaCl";
28 sha256 = "8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba";
29 };
30
31 patches = [
32 (fetchpatch2 {
33 # sphinx 8 compat
34 url = "https://github.com/pyca/pynacl/commit/81943b3c61b9cc731ae0f2e87b7a91e42fbc8fa1.patch";
35 hash = "sha256-iO3pBqGW2zZE8lG8khpPjqJso9/rmFbdnwCcBs8iFeI=";
36 })
37 ];
38
39 nativeBuildInputs = [ sphinxHook ];
40
41 buildInputs = [ libsodium ];
42
43 propagatedNativeBuildInputs = [ cffi ];
44
45 propagatedBuildInputs = [ cffi ];
46
47 nativeCheckInputs = [
48 hypothesis
49 pytestCheckHook
50 ];
51
52 SODIUM_INSTALL = "system";
53
54 pythonImportsCheck = [ "nacl" ];
55
56 meta = with lib; {
57 description = "Python binding to the Networking and Cryptography (NaCl) library";
58 homepage = "https://github.com/pyca/pynacl/";
59 license = licenses.asl20;
60 maintainers = [ ];
61 };
62}