diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2018-09-16 06:24:49 +0000 |
---|---|---|
committer | Vincent Laporte <Vincent.Laporte@gmail.com> | 2018-09-16 06:24:49 +0000 |
commit | 5b8b9a08e7e39ecec9dab658cd0fd28fa586c8cb (patch) | |
tree | 865cd5d1b74209a05fe68c032b79a741354d1a78 /pkgs/development/python-modules/libnacl | |
parent | c7a789100feca90877cf0e2c971d852e7fe5ef58 (diff) | |
download | nixlib-5b8b9a08e7e39ecec9dab658cd0fd28fa586c8cb.tar nixlib-5b8b9a08e7e39ecec9dab658cd0fd28fa586c8cb.tar.gz nixlib-5b8b9a08e7e39ecec9dab658cd0fd28fa586c8cb.tar.bz2 nixlib-5b8b9a08e7e39ecec9dab658cd0fd28fa586c8cb.tar.lz nixlib-5b8b9a08e7e39ecec9dab658cd0fd28fa586c8cb.tar.xz nixlib-5b8b9a08e7e39ecec9dab658cd0fd28fa586c8cb.tar.zst nixlib-5b8b9a08e7e39ecec9dab658cd0fd28fa586c8cb.zip |
pythonPackages.libnacl: fix build on darwin
Diffstat (limited to 'pkgs/development/python-modules/libnacl')
-rw-r--r-- | pkgs/development/python-modules/libnacl/default.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/libnacl/default.nix b/pkgs/development/python-modules/libnacl/default.nix index a8acb4dc9696..c575e5594be3 100644 --- a/pkgs/development/python-modules/libnacl/default.nix +++ b/pkgs/development/python-modules/libnacl/default.nix @@ -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; }; } |