2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2024-02-29 20:09:43 +00:00
|
|
|
, fetchpatch
|
2023-07-15 17:15:38 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonApplication
|
|
|
|
, click
|
2024-02-29 20:09:43 +00:00
|
|
|
, pydantic
|
2023-07-15 17:15:38 +00:00
|
|
|
, toml
|
|
|
|
, watchdog
|
|
|
|
, pytestCheckHook
|
|
|
|
, rsync
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "remote-exec";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.13.3";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "remote-cli";
|
|
|
|
repo = "remote";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-rsboHJLOHXnpXtsVsvsfKsav8mSbloaq2lzZnU2pw6c=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
patches = [
|
|
|
|
# relax install requirements
|
|
|
|
# https://github.com/remote-cli/remote/pull/60.patch
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/remote-cli/remote/commit/a2073c30c7f576ad7ceb46e39f996de8d06bf186.patch";
|
|
|
|
hash = "sha256-As0j+yY6LamhOCGFzvjUQoXFv46BN/tRBpvIS7r6DaI=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# remove legacy endpoints, we use --multi now
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '"mremote' '#"mremote'
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
2024-02-29 20:09:43 +00:00
|
|
|
pydantic
|
2023-07-15 17:15:38 +00:00
|
|
|
toml
|
|
|
|
watchdog
|
|
|
|
];
|
|
|
|
|
|
|
|
# disable pytest --cov
|
|
|
|
preCheck = ''
|
|
|
|
rm setup.cfg
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
rsync
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = lib.optionals stdenv.isDarwin [
|
|
|
|
# `watchdog` dependency does not correctly detect fsevents on darwin.
|
|
|
|
# this only affects `remote --stream-changes`
|
|
|
|
"test/test_file_changes.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Work with remote hosts seamlessly via rsync and ssh";
|
|
|
|
homepage = "https://github.com/remote-cli/remote";
|
2024-02-29 20:09:43 +00:00
|
|
|
changelog = "https://github.com/remote-cli/remote/releases/tag/v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ pbsds ];
|
|
|
|
};
|
|
|
|
}
|