2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
2021-08-05 21:33:18 +00:00
|
|
|
, stdenv
|
2021-06-28 23:13:55 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, cryptography
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pyspnego
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "smbprotocol";
|
2022-11-27 09:42:12 +00:00
|
|
|
version = "1.10.1";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jborean93";
|
|
|
|
repo = pname;
|
2022-11-27 09:42:12 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-8T091yF/Hu60aaUr6IDZt2cLxz1sXUbMewSqW1Ch0Vo=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
|
|
|
pyspnego
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [
|
|
|
|
# https://github.com/jborean93/smbprotocol/issues/119
|
|
|
|
"test_copymode_local_to_local_symlink_dont_follow"
|
|
|
|
"test_copystat_local_to_local_symlink_dont_follow_fail"
|
|
|
|
|
|
|
|
# fail in sandbox due to networking
|
|
|
|
"test_small_recv"
|
|
|
|
"test_recv_"
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"smbprotocol"
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python SMBv2 and v3 Client";
|
|
|
|
homepage = "https://github.com/jborean93/smbprotocol";
|
2022-11-27 09:42:12 +00:00
|
|
|
changelog = "https://github.com/jborean93/smbprotocol/releases/tag/v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|