1{ lib 2, stdenv 3, buildPythonPackage 4, cryptography 5, fetchFromGitHub 6, pyspnego 7, pytest-mock 8, pytestCheckHook 9, pythonOlder 10, six 11}: 12 13buildPythonPackage rec { 14 pname = "smbprotocol"; 15 version = "1.9.0"; 16 format = "setuptools"; 17 18 disabled = pythonOlder "3.6"; 19 20 src = fetchFromGitHub { 21 owner = "jborean93"; 22 repo = pname; 23 rev = "v${version}"; 24 sha256 = "sha256-u3brP3WsnoqRy3R0OQQkIbq+avS7nemx9GKpvTq+vxg="; 25 }; 26 27 propagatedBuildInputs = [ 28 cryptography 29 pyspnego 30 six 31 ]; 32 33 checkInputs = [ 34 pytest-mock 35 pytestCheckHook 36 ]; 37 38 disabledTests = lib.optionals stdenv.isDarwin [ 39 # https://github.com/jborean93/smbprotocol/issues/119 40 "test_copymode_local_to_local_symlink_dont_follow" 41 "test_copystat_local_to_local_symlink_dont_follow_fail" 42 43 # fail in sandbox due to networking 44 "test_small_recv" 45 "test_recv_" 46 ]; 47 48 pythonImportsCheck = [ 49 "smbprotocol" 50 ]; 51 52 meta = with lib; { 53 description = "Python SMBv2 and v3 Client"; 54 homepage = "https://github.com/jborean93/smbprotocol"; 55 license = with licenses; [ mit ]; 56 maintainers = with maintainers; [ fab ]; 57 }; 58}