2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
cryptography,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pyspnego,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "smbprotocol";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "1.12.0";
|
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";
|
2023-10-09 19:29:22 +00:00
|
|
|
repo = "smbprotocol";
|
2022-11-27 09:42:12 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-1huM+/WDrVJsB4ARh6fB6rLFOe9IqSQWr/A78FAk/Ag=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
|
|
|
pyspnego
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
|
2021-08-05 21:33:18 +00:00
|
|
|
# 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_"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +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 ];
|
|
|
|
};
|
|
|
|
}
|