diff options
author | 5aaee9 <jiduye@gmail.com> | 2022-03-28 11:27:12 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-28 13:27:12 +0200 |
commit | 8aa41aeaea77d1ad943abbbbaf0252b1a4cee81c (patch) | |
tree | 6ecf25ebd7bd218f9ac947f652975c784a2200ec /pkgs/servers | |
parent | cb76c8bee3944169e9137c57c7394e9b5ba6db0d (diff) |
teleport: fix exec srv command not found (#165588)
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/teleport/0001-fix-add-nix-path-to-exec-env.patch | 28 | ||||
-rw-r--r-- | pkgs/servers/teleport/default.nix | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/servers/teleport/0001-fix-add-nix-path-to-exec-env.patch b/pkgs/servers/teleport/0001-fix-add-nix-path-to-exec-env.patch new file mode 100644 index 0000000000000..27242b218328c --- /dev/null +++ b/pkgs/servers/teleport/0001-fix-add-nix-path-to-exec-env.patch @@ -0,0 +1,28 @@ +From e3651ca79c0edb66c04e0d3381f3b0b6f76d37d2 Mon Sep 17 00:00:00 2001 +From: 5aaee9 <jiduye@gmail.com> +Date: Thu, 24 Mar 2022 17:34:38 +0800 +Subject: [PATCH] fix: add nix path to exec env + +--- + lib/srv/exec.go | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/srv/exec.go b/lib/srv/exec.go +index 253fbafef..815a2e1e0 100644 +--- a/lib/srv/exec.go ++++ b/lib/srv/exec.go +@@ -41,9 +41,9 @@ import ( + ) + + const ( +- defaultPath = "/bin:/usr/bin:/usr/local/bin:/sbin" ++ defaultPath = "/bin:/usr/bin:/usr/local/bin:/sbin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/run/wrappers/bin" + defaultEnvPath = "PATH=" + defaultPath +- defaultRootPath = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ++ defaultRootPath = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/etc/profiles/per-user/root/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/run/wrappers/bin" + defaultEnvRootPath = "PATH=" + defaultRootPath + defaultTerm = "xterm" + defaultLoginDefsPath = "/etc/login.defs" +-- +2.32.0 (Apple Git-132) + diff --git a/pkgs/servers/teleport/default.nix b/pkgs/servers/teleport/default.nix index ac57cc51339fe..9f1348fff19f9 100644 --- a/pkgs/servers/teleport/default.nix +++ b/pkgs/servers/teleport/default.nix @@ -60,6 +60,7 @@ buildGoModule rec { ./tsh.patch # https://github.com/NixOS/nixpkgs/issues/132652 ./test.patch + ./0001-fix-add-nix-path-to-exec-env.patch ]; # Reduce closure size for client machines |