diff options
| author | Danny Milosavljevic <dannym@friendly-machines.com> | 2026-05-03 17:19:56 +0200 |
|---|---|---|
| committer | Danny Milosavljevic <dannym@friendly-machines.com> | 2026-06-05 09:22:28 +0200 |
| commit | dc38db3c2d9775a04fcc12008d7ac1ca00269335 (patch) | |
| tree | c6a3cbf022fa4c06267e1681511f8621a4c89648 | |
| parent | da0de42721d8262fdc1932688352f405b5d96415 (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.patch | 22 |
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