1{ lib
2, buildPythonPackage
3, fetchPypi
4, pytestCheckHook
5, pythonOlder
6, libsodium
7, cffi
8, hypothesis
9, stdenv
10, six
11}:
12
13buildPythonPackage rec {
14 pname = "pynacl";
15 version = "1.4.0";
16 disabled = pythonOlder "3.6";
17
18 src = fetchPypi {
19 inherit version;
20 pname = "PyNaCl";
21 sha256 = "01b56hxrbif3hx8l6rwz5kljrgvlbj7shmmd2rjh0hn7974a5sal";
22 };
23
24 buildInputs = [
25 libsodium
26 ];
27
28 propagatedNativeBuildInputs = [
29 cffi
30 ];
31
32 propagatedBuildInputs = [
33 cffi
34 six
35 ];
36
37 checkInputs = [
38 hypothesis
39 pytestCheckHook
40 ];
41
42 SODIUM_INSTALL = "system";
43
44 pythonImportsCheck = [ "nacl" ];
45
46 meta = with lib; {
47 description = "Python binding to the Networking and Cryptography (NaCl) library";
48 homepage = "https://github.com/pyca/pynacl/";
49 license = licenses.asl20;
50 };
51}