From 7cd25dd8438d83a5c8aa3fb009ba76228d588ade Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Sat, 18 Mar 2023 23:15:22 +0100 Subject: [PATCH] remote-exec: init at 1.13.2 --- pkgs/tools/misc/remote-exec/default.nix | 64 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 66 insertions(+) create mode 100644 pkgs/tools/misc/remote-exec/default.nix diff --git a/pkgs/tools/misc/remote-exec/default.nix b/pkgs/tools/misc/remote-exec/default.nix new file mode 100644 index 000000000000..afedab81cbd6 --- /dev/null +++ b/pkgs/tools/misc/remote-exec/default.nix @@ -0,0 +1,64 @@ +{ lib +, stdenv +, fetchFromGitHub +, buildPythonApplication +, click +, pydantic +, toml +, watchdog +, pytestCheckHook +, rsync +}: + +buildPythonApplication rec { + pname = "remote-exec"; + version = "1.13.2"; + + src = fetchFromGitHub { + owner = "remote-cli"; + repo = "remote"; + rev = "refs/tags/v${version}"; + hash = "sha256-xaxkN6XukV9HiLYehwVTBZB8bUyjgpfg+pPfAGrOkgo="; + }; + + # remove legacy endpoints, we use --multi now + postPatch = '' + substituteInPlace setup.py \ + --replace '"mremote' '#"mremote' + ''; + + propagatedBuildInputs = [ + click + pydantic + 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"; + license = licenses.bsd2; + maintainers = with maintainers; [ pbsds ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2ddc3c979284..25b886161c9b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12070,6 +12070,8 @@ with pkgs; remote-touchpad = callPackage ../tools/inputmethods/remote-touchpad { }; + remote-exec = python3Packages.callPackage ../tools/misc/remote-exec { }; + reposurgeon = callPackage ../applications/version-management/reposurgeon { }; reptyr = callPackage ../os-specific/linux/reptyr { };