python3Packages.libnacl: 1.7.1 -> 1.7.2 (#113050)

This commit is contained in:
Fabian Affolter 2021-02-17 04:01:39 +01:00 committed by GitHub
parent 1a4c039432
commit 4465f42c0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,33 +1,41 @@
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pytest, libsodium }: { lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, libsodium
, pytestCheckHook
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "libnacl"; pname = "libnacl";
version = "1.7.1"; version = "1.7.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "saltstack"; owner = "saltstack";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "10rpim9lf0qd861a3miq8iqg8w87slqwqni7nq66h72jdk130axg"; sha256 = "sha256-nttR9PQimhqd2pByJ5IJzJ4RmSI4y7lcX7a7jcK+vqc=";
}; };
checkInputs = [ pytest ]; buildInputs = [ libsodium ];
propagatedBuildInputs = [ libsodium ];
postPatch = postPatch =
let soext = stdenv.hostPlatform.extensions.sharedLibrary; in '' let soext = stdenv.hostPlatform.extensions.sharedLibrary; in
substituteInPlace "./libnacl/__init__.py" --replace "ctypes.cdll.LoadLibrary('libsodium${soext}')" "ctypes.cdll.LoadLibrary('${libsodium}/lib/libsodium${soext}')" ''
''; substituteInPlace "./libnacl/__init__.py" --replace \
"ctypes.cdll.LoadLibrary('libsodium${soext}')" \
"ctypes.cdll.LoadLibrary('${libsodium}/lib/libsodium${soext}')"
'';
checkPhase = '' checkInputs = [ pytestCheckHook ];
py.test
''; pythonImportsCheck = [ "libnacl" ];
meta = with lib; { meta = with lib; {
maintainers = with maintainers; [ xvapx ];
description = "Python bindings for libsodium based on ctypes"; description = "Python bindings for libsodium based on ctypes";
homepage = "https://pypi.python.org/pypi/libnacl"; homepage = "https://libnacl.readthedocs.io/";
license = licenses.asl20; license = licenses.asl20;
platforms = platforms.unix; platforms = platforms.unix;
maintainers = with maintainers; [ xvapx ];
}; };
} }