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

pythonPackages.libnacl: fix build on darwin

authored by

Jörg Thalheim and committed by
GitHub
33ccf046 32632fbb

+4 -3
+4 -3
pkgs/development/python-modules/libnacl/default.nix
··· 14 buildInputs = [ pytest ]; 15 propagatedBuildInputs = [ libsodium ]; 16 17 - postPatch = '' 18 - substituteInPlace "./libnacl/__init__.py" --replace "ctypes.cdll.LoadLibrary('libsodium.so')" "ctypes.cdll.LoadLibrary('${libsodium}/lib/libsodium.so')" 19 ''; 20 21 checkPhase = '' ··· 27 description = "Python bindings for libsodium based on ctypes"; 28 homepage = https://pypi.python.org/pypi/libnacl; 29 license = licenses.asl20; 30 - platforms = platforms.linux; 31 }; 32 }
··· 14 buildInputs = [ pytest ]; 15 propagatedBuildInputs = [ libsodium ]; 16 17 + postPatch = 18 + let soext = stdenv.hostPlatform.extensions.sharedLibrary; in '' 19 + substituteInPlace "./libnacl/__init__.py" --replace "ctypes.cdll.LoadLibrary('libsodium${soext}')" "ctypes.cdll.LoadLibrary('${libsodium}/lib/libsodium${soext}')" 20 ''; 21 22 checkPhase = '' ··· 28 description = "Python bindings for libsodium based on ctypes"; 29 homepage = https://pypi.python.org/pypi/libnacl; 30 license = licenses.asl20; 31 + platforms = platforms.unix; 32 }; 33 }