2021-06-07 07:01:49 +00:00
|
|
|
{ lib
|
2021-07-24 05:08:10 +00:00
|
|
|
, stdenv
|
2021-06-07 07:01:49 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, cryptography
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pyspnego
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "smbprotocol";
|
2021-08-25 06:37:57 +00:00
|
|
|
version = "1.6.2";
|
2021-06-07 07:01:49 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jborean93";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-08-25 06:37:57 +00:00
|
|
|
sha256 = "sha256-nSWZfhZD++I5hM2ijqft2U95kyEe3h/nrSfiT3sQiKE=";
|
2021-06-07 07:01:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
|
|
|
pyspnego
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-07-24 05:08:10 +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-06-07 07:01:49 +00:00
|
|
|
pythonImportsCheck = [ "smbprotocol" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python SMBv2 and v3 Client";
|
|
|
|
homepage = "https://github.com/jborean93/smbprotocol";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|