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