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