From 1faa09be013e799ab12c4942a39a7b1682dc80af Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Sun, 24 Feb 2019 13:45:56 -0500 Subject: [PATCH] pythonPackages.pynacl: refactor remove deprecated hypothesis testing args --- .../python-modules/pynacl/default.nix | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/pynacl/default.nix b/pkgs/development/python-modules/pynacl/default.nix index 3fe1952213e0..ed0e8acc16e7 100644 --- a/pkgs/development/python-modules/pynacl/default.nix +++ b/pkgs/development/python-modules/pynacl/default.nix @@ -1,14 +1,21 @@ -{ stdenv, buildPythonPackage, fetchFromGitHub, pytest, libsodium, cffi, six, hypothesis}: +{ stdenv +, buildPythonPackage +, fetchPypi +, pytest +, libsodium +, cffi +, six +, hypothesis +}: buildPythonPackage rec { pname = "pynacl"; version = "1.3.0"; - src = fetchFromGitHub { - owner = "pyca"; - repo = pname; - rev = version; - sha256 = "0ac00d5bfdmz1x428h2scq5b34llp61yhxradl94qjwz7ikqv052"; + src = fetchPypi { + inherit version; + pname = "PyNaCl"; + sha256 = "0c6100edd16fefd1557da078c7a31e7b7d7a52ce39fdca2bec29d4f7b6e7600c"; }; checkInputs = [ pytest hypothesis ]; @@ -16,6 +23,13 @@ buildPythonPackage rec { SODIUM_INSTALL = "system"; + # fixed in next release 1.3.0+ + # https://github.com/pyca/pynacl/pull/480 + postPatch = '' + substituteInPlace tests/test_bindings.py \ + --replace "average_size=128," "" + ''; + checkPhase = '' py.test '';