11 buildPythonPackage rec {
16 src = fetchFromGitHub {
20 hash = "sha256-phECLGDcBfDi/r2y0eGtqgIX/hvirtBqO8UUvEJ66zo=";
23 nativeBuildInputs = [ poetry-core ];
25 buildInputs = [ libsodium ];
29 soext = stdenv.hostPlatform.extensions.sharedLibrary;
32 substituteInPlace "./libnacl/__init__.py" \
34 "l_path = ctypes.util.find_library('sodium')" \
37 "ctypes.cdll.LoadLibrary('libsodium${soext}')" \
38 "ctypes.cdll.LoadLibrary('${libsodium}/lib/libsodium${soext}')"
41 nativeCheckInputs = [ pytestCheckHook ];
43 pythonImportsCheck = [ "libnacl" ];
46 description = "Python bindings for libsodium based on ctypes";
47 homepage = "https://libnacl.readthedocs.io/";
48 license = licenses.asl20;
49 platforms = platforms.unix;
50 maintainers = with maintainers; [ xvapx ];