From 4465f42c0aa77607d6cc2d00327b09eb462660eb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 17 Feb 2021 04:01:39 +0100 Subject: [PATCH] python3Packages.libnacl: 1.7.1 -> 1.7.2 (#113050) --- .../python-modules/libnacl/default.nix | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/libnacl/default.nix b/pkgs/development/python-modules/libnacl/default.nix index 2406738cf1bb..f8cb85ab4182 100644 --- a/pkgs/development/python-modules/libnacl/default.nix +++ b/pkgs/development/python-modules/libnacl/default.nix @@ -1,33 +1,41 @@ -{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pytest, libsodium }: +{ lib +, stdenv +, buildPythonPackage +, fetchFromGitHub +, libsodium +, pytestCheckHook +}: buildPythonPackage rec { pname = "libnacl"; - version = "1.7.1"; + version = "1.7.2"; src = fetchFromGitHub { owner = "saltstack"; repo = pname; rev = "v${version}"; - sha256 = "10rpim9lf0qd861a3miq8iqg8w87slqwqni7nq66h72jdk130axg"; + sha256 = "sha256-nttR9PQimhqd2pByJ5IJzJ4RmSI4y7lcX7a7jcK+vqc="; }; - checkInputs = [ pytest ]; - propagatedBuildInputs = [ libsodium ]; + buildInputs = [ libsodium ]; postPatch = - let soext = stdenv.hostPlatform.extensions.sharedLibrary; in '' - substituteInPlace "./libnacl/__init__.py" --replace "ctypes.cdll.LoadLibrary('libsodium${soext}')" "ctypes.cdll.LoadLibrary('${libsodium}/lib/libsodium${soext}')" - ''; + let soext = stdenv.hostPlatform.extensions.sharedLibrary; in + '' + substituteInPlace "./libnacl/__init__.py" --replace \ + "ctypes.cdll.LoadLibrary('libsodium${soext}')" \ + "ctypes.cdll.LoadLibrary('${libsodium}/lib/libsodium${soext}')" + ''; - checkPhase = '' - py.test - ''; + checkInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "libnacl" ]; meta = with lib; { - maintainers = with maintainers; [ xvapx ]; description = "Python bindings for libsodium based on ctypes"; - homepage = "https://pypi.python.org/pypi/libnacl"; + homepage = "https://libnacl.readthedocs.io/"; license = licenses.asl20; platforms = platforms.unix; + maintainers = with maintainers; [ xvapx ]; }; }