diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2022-03-04 14:46:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-04 14:46:52 +0100 |
commit | f74045c683f24f89db0821d19ac65289883f0e7f (patch) | |
tree | 0ed4171f379fce319c15a0c18687e3bea87f2c83 | |
parent | 355cfdbcd32111ca6206b3a22c3fe86268e38557 (diff) | |
parent | a31c55c3a46bf296bc774694efb7a4114735772b (diff) |
Merge pull request #161443 from aanderse/krunner-ssh
-rw-r--r-- | pkgs/desktops/plasma-5/3rdparty/addons/krunner-ssh.nix | 43 | ||||
-rw-r--r-- | pkgs/desktops/plasma-5/default.nix | 1 | ||||
-rw-r--r-- | pkgs/top-level/aliases.nix | 1 |
3 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/desktops/plasma-5/3rdparty/addons/krunner-ssh.nix b/pkgs/desktops/plasma-5/3rdparty/addons/krunner-ssh.nix new file mode 100644 index 0000000000000..caf3819a3611a --- /dev/null +++ b/pkgs/desktops/plasma-5/3rdparty/addons/krunner-ssh.nix @@ -0,0 +1,43 @@ +{ lib, stdenv, fetchFromGitLab, python3 }: +let + pythonEnv = python3.withPackages (p: with p; [ dbus-python pygobject3 ]); +in +stdenv.mkDerivation rec { + pname = "krunner-ssh"; + version = "1.0"; + + src = fetchFromGitLab { + owner = "Programie"; + repo = "krunner-ssh"; + rev = version; + sha256 = "sha256-rFTTvmetDeN6t0axVc+8t1TRiuyPBpwqhvsq2IFxa/A="; + }; + + postPatch = '' + sed -e "s|Exec=.*|Exec=$out/libexec/runner.py|" -i ssh-runner.service + ''; + + nativeBuildInputs = [ + pythonEnv + ]; + + installPhase = '' + runHook preInstall + + patchShebangs runner.py + + install -m 0755 -D runner.py $out/libexec/runner.py + install -m 0755 -D ssh-runner.desktop $out/share/kservices5/ssh-runner.desktop + install -m 0755 -D ssh-runner.service $out/share/dbus-1/services/com.selfcoders.ssh-runner.service + + runHook postInstall + ''; + + meta = with lib; { + description = "A simple backend for KRunner providing SSH hosts from your .ssh/known_hosts file as search results"; + homepage = "https://selfcoders.com/projects/krunner-ssh"; + license = licenses.mit; + maintainers = with maintainers; [ aanderse ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/plasma-5/default.nix b/pkgs/desktops/plasma-5/default.nix index 0eafc182e46f7..072d999b1a925 100644 --- a/pkgs/desktops/plasma-5/default.nix +++ b/pkgs/desktops/plasma-5/default.nix @@ -161,6 +161,7 @@ let kwin-dynamic-workspaces = callPackage ./3rdparty/kwin/scripts/dynamic-workspaces.nix { }; kwin-tiling = callPackage ./3rdparty/kwin/scripts/tiling.nix { }; krohnkite = callPackage ./3rdparty/kwin/scripts/krohnkite.nix { }; + krunner-ssh = callPackage ./3rdparty/addons/krunner-ssh.nix { }; krunner-symbols = callPackage ./3rdparty/addons/krunner-symbols.nix { }; lightly = callPackage ./3rdparty/lightly { }; parachute = callPackage ./3rdparty/kwin/scripts/parachute.nix { }; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 3dfc5cf510d68..02bc197f92adc 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1441,6 +1441,7 @@ mapAliases ({ inherit (plasma5Packages.thirdParty) krohnkite + krunner-ssh krunner-symbols kwin-dynamic-workspaces kwin-tiling |