diff --git a/.gitignore b/.gitignore index d1c4634..ee55ffa 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ result /configuration.nix /hardware-configuration.nix .direnv +.remote.toml diff --git a/.remoteignore.toml b/.remoteignore.toml new file mode 100644 index 0000000..04b0426 --- /dev/null +++ b/.remoteignore.toml @@ -0,0 +1,11 @@ +[push] +exclude = [] +include = [] + +[pull] +exclude = ["*"] +include = [] + +[both] +exclude = [ ".remote.toml",] +include = [] diff --git a/pkgs/remote-exec.nix b/pkgs/remote-exec.nix new file mode 100644 index 0000000..552bc03 --- /dev/null +++ b/pkgs/remote-exec.nix @@ -0,0 +1,48 @@ +{ lib +, fetchFromGitHub +, buildPythonApplication +# inputs +, click +, toml +, pydantic +, watchdog +# testing +, pytestCheckHook +, rsync +}: + +buildPythonApplication rec { + pname = "remote-exec"; + version = "1.11.0"; + src = fetchFromGitHub { + owner = "remote-cli"; + repo = "remote"; + rev = "953b22b43adaadf8bbcd845f7a11e3cffae8ac6a"; + hash = "sha256-yPiLTwToU1L9Hp/Ny7nDWUghCaqJzkh6GLVDd0N8x6g="; + }; + propagatedBuildInputs = [ + click + toml + pydantic + watchdog + ]; + + # remove --cov from pytest + preCheck = '' + rm setup.cfg + ''; + + doCheck = true; + checkInputs = [ + pytestCheckHook + rsync + ]; + + meta = with lib; { + homepage = "https://github.com/remote-cli/remote"; + description = "Work with remote hosts seamlessly via rsync and ssh. Code locally, build and execute remotely"; + platform = platforms.all; + license = licenses.bsd2; + maintainers = with maintainers; [ pbsds ]; + }; +}