1{ lib
2, stdenv
3, fetchFromGitHub
4, buildPythonApplication
5, click
6, pydantic
7, toml
8, watchdog
9, pytestCheckHook
10, rsync
11}:
12
13buildPythonApplication rec {
14 pname = "remote-exec";
15 version = "1.13.2";
16
17 src = fetchFromGitHub {
18 owner = "remote-cli";
19 repo = "remote";
20 rev = "refs/tags/v${version}";
21 hash = "sha256-xaxkN6XukV9HiLYehwVTBZB8bUyjgpfg+pPfAGrOkgo=";
22 };
23
24 # remove legacy endpoints, we use --multi now
25 postPatch = ''
26 substituteInPlace setup.py \
27 --replace '"mremote' '#"mremote'
28 '';
29
30 propagatedBuildInputs = [
31 click
32 pydantic
33 toml
34 watchdog
35 ];
36
37 # disable pytest --cov
38 preCheck = ''
39 rm setup.cfg
40 '';
41
42 doCheck = true;
43
44 nativeCheckInputs = [
45 rsync
46 ];
47
48 checkInputs = [
49 pytestCheckHook
50 ];
51
52 disabledTestPaths = lib.optionals stdenv.isDarwin [
53 # `watchdog` dependency does not correctly detect fsevents on darwin.
54 # this only affects `remote --stream-changes`
55 "test/test_file_changes.py"
56 ];
57
58 meta = with lib; {
59 description = "Work with remote hosts seamlessly via rsync and ssh";
60 homepage = "https://github.com/remote-cli/remote";
61 license = licenses.bsd2;
62 maintainers = with maintainers; [ pbsds ];
63 };
64}