1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-28 08:31:59 +00:00

Merge pull request #46731 from vbgl/python-libnacl-darwin

pythonPackages.libnacl: fix build on darwin
This commit is contained in:
Jörg Thalheim 2018-09-16 09:25:10 +01:00 committed by GitHub
commit 33ccf04666
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,8 +14,9 @@ buildPythonPackage rec {
buildInputs = [ pytest ];
propagatedBuildInputs = [ libsodium ];
postPatch = ''
substituteInPlace "./libnacl/__init__.py" --replace "ctypes.cdll.LoadLibrary('libsodium.so')" "ctypes.cdll.LoadLibrary('${libsodium}/lib/libsodium.so')"
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}')"
'';
checkPhase = ''
@ -27,6 +28,6 @@ buildPythonPackage rec {
description = "Python bindings for libsodium based on ctypes";
homepage = https://pypi.python.org/pypi/libnacl;
license = licenses.asl20;
platforms = platforms.linux;
platforms = platforms.unix;
};
}