Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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.8.2";
16 disabled = pythonOlder "3.6";
17
18 src = fetchFromGitHub {
19 owner = "jborean93";
20 repo = pname;
21 rev = "v${version}";
22 sha256 = "sha256-NBwfWW02lzR4Xk+7qodQX+eIXMTtdy9WOtLzsf30d4c=";
23 };
24
25 propagatedBuildInputs = [
26 cryptography
27 pyspnego
28 six
29 ];
30
31 checkInputs = [
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 = [ "smbprotocol" ];
47
48 meta = with lib; {
49 description = "Python SMBv2 and v3 Client";
50 homepage = "https://github.com/jborean93/smbprotocol";
51 license = with licenses; [ mit ];
52 maintainers = with maintainers; [ fab ];
53 };
54}