Skip to content

Commit

Permalink
pythonPackages.libnacl: fix build on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
vbgl committed Sep 16, 2018
1 parent c7a7891 commit 5b8b9a0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkgs/development/python-modules/libnacl/default.nix
Expand Up @@ -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 = ''
Expand All @@ -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;
};
}

0 comments on commit 5b8b9a0

Please sign in to comment.