1{ stdenv
2, lib
3, asyncssh
4, bcrypt
5, buildPythonPackage
6, fetchFromGitHub
7, fsspec
8, mock-ssh-server
9, pytest-asyncio
10, pytestCheckHook
11, setuptools
12, setuptools-scm
13}:
14
15buildPythonPackage rec {
16 pname = "sshfs";
17 version = "2023.10.0";
18
19 src = fetchFromGitHub {
20 owner = "fsspec";
21 repo = pname;
22 rev = "refs/tags/${version}";
23 hash = "sha256-6MueDHR+jZFDZg4zufEVhBtSwcgDd7KnW9gJp2hDu0A=";
24 };
25
26 SETUPTOOLS_SCM_PRETEND_VERSION = version;
27
28 nativeBuildInputs = [
29 setuptools
30 setuptools-scm
31 ];
32
33 propagatedBuildInputs = [
34 asyncssh
35 bcrypt
36 fsspec
37 ];
38
39 __darwinAllowLocalNetworking = true;
40
41 nativeCheckInputs = [
42 mock-ssh-server
43 pytest-asyncio
44 pytestCheckHook
45 ];
46
47 disabledTests = lib.optionals stdenv.isDarwin [
48 # test fails with sandbox enabled
49 "test_checksum"
50 ];
51
52 pythonImportsCheck = [
53 "sshfs"
54 ];
55
56 meta = with lib; {
57 description = "SSH/SFTP implementation for fsspec";
58 homepage = "https://github.com/fsspec/sshfs/";
59 changelog = "https://github.com/fsspec/sshfs/releases/tag/${version}";
60 license = licenses.asl20;
61 maintainers = with maintainers; [ melling ];
62 };
63}