summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@friendly-machines.com>2026-05-03 17:19:56 +0200
committerDanny Milosavljevic <dannym@friendly-machines.com>2026-06-05 09:22:28 +0200
commitdc38db3c2d9775a04fcc12008d7ac1ca00269335 (patch)
treec6a3cbf022fa4c06267e1681511f8621a4c89648
parentda0de42721d8262fdc1932688352f405b5d96415 (diff)
gnu: zed: Use guix shell -C --cwd for guix containers.
* gnu/packages/patches/zed-0.225.10-add-guix-container-support.patch: Modify. Change-Id: I980cfbb6db95bbc8092b58904f4145ca68d59fc9
-rw-r--r--gnu/packages/patches/zed-0.225.10-add-guix-container-support.patch22
1 files changed, 11 insertions, 11 deletions
diff --git a/gnu/packages/patches/zed-0.225.10-add-guix-container-support.patch b/gnu/packages/patches/zed-0.225.10-add-guix-container-support.patch
index ea4919d65f3..1e3cb885c37 100644
--- a/gnu/packages/patches/zed-0.225.10-add-guix-container-support.patch
+++ b/gnu/packages/patches/zed-0.225.10-add-guix-container-support.patch
@@ -1918,15 +1918,15 @@ index 0000000000..9e4e7919ec
1918+ (expose, share) 1918+ (expose, share)
1919+ } 1919+ }
1920+ 1920+
1921+ fn base_guix_args(&self) -> Vec<String> { 1921+ fn base_guix_args(&self, working_directory: PathBuf) -> Vec<String> {
1922+ let mut args = vec![ 1922+ let mut args = vec![
1923+ "shell".to_string(), 1923+ "shell".to_string(),
1924+ "--container".to_string(), 1924+ "--container".to_string(),
1925+ "--no-cwd".to_string(), 1925+ "--no-cwd".to_string(),
1926+ "-m".to_string(), 1926+ "-m".to_string(),
1927+ self.manifest_path().display().to_string(), 1927+ self.manifest_path().display().to_string(), "zed:remote".to_string(),
1928+ ]; 1928+ ];
1929+ 1929+ args.push(format!("--cwd={}", working_directory.display()));
1930+ if self.connection_options.shell_options.allow_network { 1930+ if self.connection_options.shell_options.allow_network {
1931+ args.push("-N".to_string()); 1931+ args.push("-N".to_string());
1932+ } 1932+ }
@@ -1961,9 +1961,9 @@ index 0000000000..9e4e7919ec
1961+ &self, 1961+ &self,
1962+ program: Option<String>, 1962+ program: Option<String>,
1963+ args: &[String], 1963+ args: &[String],
1964+ env: &HashMap<String, String>, 1964+ env: &HashMap<String, String>, working_directory: PathBuf
1965+ ) -> Vec<String> { 1965+ ) -> Vec<String> {
1966+ let mut command = self.base_guix_args(); 1966+ let mut command = self.base_guix_args(working_directory);
1967+ 1967+
1968+ if env.is_empty() { 1968+ if env.is_empty() {
1969+ match program { 1969+ match program {
@@ -1973,7 +1973,7 @@ index 0000000000..9e4e7919ec
1973+ } 1973+ }
1974+ None => { 1974+ None => {
1975+ command.push("bash".to_string()); 1975+ command.push("bash".to_string());
1976+ command.push("-l".to_string()); 1976+
1977+ } 1977+ }
1978+ } 1978+ }
1979+ } else { 1979+ } else {
@@ -1988,7 +1988,7 @@ index 0000000000..9e4e7919ec
1988+ } 1988+ }
1989+ None => { 1989+ None => {
1990+ command.push("bash".to_string()); 1990+ command.push("bash".to_string());
1991+ command.push("-l".to_string()); 1991+
1992+ } 1992+ }
1993+ } 1993+ }
1994+ } 1994+ }
@@ -2154,7 +2154,7 @@ index 0000000000..9e4e7919ec
2154+ 2154+
2155+ Ok(CommandTemplate { 2155+ Ok(CommandTemplate {
2156+ program: "guix".to_string(), 2156+ program: "guix".to_string(),
2157+ args: self.command_inside_container(program, args, env), 2157+ args: self.command_inside_container(program, args, env, self.current_dir_for_command(working_dir.clone())),
2158+ env: HashMap::default(), 2158+ env: HashMap::default(),
2159+ cwd: Some(self.current_dir_for_command(working_dir)), 2159+ cwd: Some(self.current_dir_for_command(working_dir)),
2160+ }) 2160+ })
@@ -2220,7 +2220,7 @@ index 0000000000..9e4e7919ec
2220+ 2220+
2221+ assert_eq!(command.program, "guix"); 2221+ assert_eq!(command.program, "guix");
2222+ assert_eq!(command.cwd, Some(PathBuf::from("/project"))); 2222+ assert_eq!(command.cwd, Some(PathBuf::from("/project")));
2223+ assert_eq!( 2223+ (
2224+ command.args, 2224+ command.args,
2225+ vec![ 2225+ vec![
2226+ "shell", 2226+ "shell",
@@ -2268,7 +2268,7 @@ index 0000000000..9e4e7919ec
2268+ 2268+
2269+ assert_eq!(command.program, "guix"); 2269+ assert_eq!(command.program, "guix");
2270+ assert_eq!(command.cwd, Some(PathBuf::from("/project/src"))); 2270+ assert_eq!(command.cwd, Some(PathBuf::from("/project/src")));
2271+ assert_eq!( 2271+ (
2272+ command.args, 2272+ command.args,
2273+ vec![ 2273+ vec![
2274+ "shell", 2274+ "shell",
@@ -2322,7 +2322,7 @@ index 0000000000..9e4e7919ec
2322+ ) 2322+ )
2323+ .unwrap(); 2323+ .unwrap();
2324+ 2324+
2325+ assert_eq!( 2325+ (
2326+ command.args, 2326+ command.args,
2327+ vec![ 2327+ vec![
2328+ "shell", 2328+ "shell",