1{ stdenv, buildPythonPackage, fetchFromGitHub, pytest, coverage, libsodium, cffi, six, hypothesis}:
2
3buildPythonPackage rec {
4 pname = "pynacl";
5 version = "1.2.1";
6
7 src = fetchFromGitHub {
8 owner = "pyca";
9 repo = pname;
10 rev = version;
11 sha256 = "0z9i1z4hjzmp23igyhvg131gikbrr947506lwfb3fayf0agwfv8f";
12 };
13
14 # set timeout to unlimited, remove deadline from tests, see https://github.com/pyca/pynacl/issues/370
15 patches = [ ./pynacl-no-timeout-and-deadline.patch ];
16
17 checkInputs = [ pytest hypothesis ];
18 propagatedBuildInputs = [ libsodium cffi six ];
19
20 SODIUM_INSTALL = "system";
21
22 checkPhase = ''
23 py.test
24 '';
25
26 meta = with stdenv.lib; {
27 maintainers = with maintainers; [ va1entin ];
28 description = "Python binding to the Networking and Cryptography (NaCl) library";
29 homepage = https://github.com/pyca/pynacl/;
30 license = licenses.asl20;
31 };
32}