2018-02-10 23:01:48 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchFromGitHub, pytest, coverage, libsodium, cffi, six, hypothesis}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pynacl";
|
|
|
|
version = "1.2.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pyca";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0z9i1z4hjzmp23igyhvg131gikbrr947506lwfb3fayf0agwfv8f";
|
|
|
|
};
|
|
|
|
|
2018-02-18 17:01:56 +00:00
|
|
|
# set timeout to unlimited, remove deadline from tests, see https://github.com/pyca/pynacl/issues/370
|
2018-02-11 20:04:24 +00:00
|
|
|
patches = [ ./pynacl-no-timeout-and-deadline.patch ];
|
2018-02-10 23:01:48 +00:00
|
|
|
|
2018-02-18 17:01:56 +00:00
|
|
|
checkInputs = [ pytest hypothesis ];
|
2018-02-10 23:01:48 +00:00
|
|
|
propagatedBuildInputs = [ libsodium cffi six ];
|
|
|
|
|
2018-02-18 17:02:18 +00:00
|
|
|
SODIUM_INSTALL = "system";
|
|
|
|
|
2018-02-10 23:01:48 +00:00
|
|
|
checkPhase = ''
|
2018-02-18 17:01:56 +00:00
|
|
|
py.test
|
2018-02-10 23:01:48 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
maintainers = with maintainers; [ va1entin ];
|
|
|
|
description = "Python binding to the Networking and Cryptography (NaCl) library";
|
|
|
|
homepage = https://github.com/pyca/pynacl/;
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|