From 1f721eeaf4e7903eecbd402e9e1a68799e2b10ed Mon Sep 17 00:00:00 2001 From: Niklas Korz Date: Sun, 12 Oct 2025 11:11:52 +0200 Subject: [PATCH] zed-editor: 0.204.5 -> 0.207.4 Changelogs: - https://github.com/zed-industries/zed/releases/tag/v0.207.4 - https://github.com/zed-industries/zed/releases/tag/v0.207.3 - https://github.com/zed-industries/zed/releases/tag/v0.206.7 - https://github.com/zed-industries/zed/releases/tag/v0.206.6 - https://github.com/zed-industries/zed/releases/tag/v0.205.9 - https://github.com/zed-industries/zed/releases/tag/v0.205.8 - https://github.com/zed-industries/zed/releases/tag/v0.205.6 - https://github.com/zed-industries/zed/releases/tag/v0.205.5 - https://github.com/zed-industries/zed/releases/tag/v0.205.4 Co-authored-by: TomaSajt <62384384+TomaSajt@users.noreply.github.com> --- ...patch => 0001-fix-duplicate-reqwest.patch} | 0 .../ze/zed-editor/0001-linux-linker.patch | 19 -------- pkgs/by-name/ze/zed-editor/package.nix | 46 +++++++++---------- 3 files changed, 22 insertions(+), 43 deletions(-) rename pkgs/by-name/ze/zed-editor/{0002-fix-duplicate-reqwest.patch => 0001-fix-duplicate-reqwest.patch} (100%) delete mode 100644 pkgs/by-name/ze/zed-editor/0001-linux-linker.patch diff --git a/pkgs/by-name/ze/zed-editor/0002-fix-duplicate-reqwest.patch b/pkgs/by-name/ze/zed-editor/0001-fix-duplicate-reqwest.patch similarity index 100% rename from pkgs/by-name/ze/zed-editor/0002-fix-duplicate-reqwest.patch rename to pkgs/by-name/ze/zed-editor/0001-fix-duplicate-reqwest.patch diff --git a/pkgs/by-name/ze/zed-editor/0001-linux-linker.patch b/pkgs/by-name/ze/zed-editor/0001-linux-linker.patch deleted file mode 100644 index 5deef7339a72..000000000000 --- a/pkgs/by-name/ze/zed-editor/0001-linux-linker.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/.cargo/config.toml b/.cargo/config.toml -index 717c5e1..0bb7b6c 100644 ---- a/.cargo/config.toml -+++ b/.cargo/config.toml -@@ -5,14 +5,6 @@ rustflags = ["-C", "symbol-mangling-version=v0", "--cfg", "tokio_unstable"] - [alias] - xtask = "run --package xtask --" - --[target.x86_64-unknown-linux-gnu] --linker = "clang" --rustflags = ["-C", "link-arg=-fuse-ld=mold"] -- --[target.aarch64-unknown-linux-gnu] --linker = "clang" --rustflags = ["-C", "link-arg=-fuse-ld=mold"] -- - [target.'cfg(target_os = "windows")'] - rustflags = [ - "--cfg", diff --git a/pkgs/by-name/ze/zed-editor/package.nix b/pkgs/by-name/ze/zed-editor/package.nix index 29dc13b403bc..0811b18ce66d 100644 --- a/pkgs/by-name/ze/zed-editor/package.nix +++ b/pkgs/by-name/ze/zed-editor/package.nix @@ -99,7 +99,7 @@ let in rustPlatform.buildRustPackage (finalAttrs: { pname = "zed-editor"; - version = "0.204.5"; + version = "0.207.4"; outputs = [ "out" @@ -112,38 +112,36 @@ rustPlatform.buildRustPackage (finalAttrs: { owner = "zed-industries"; repo = "zed"; tag = "v${finalAttrs.version}"; - hash = "sha256-P3mD4jaoQA4zWHjWtrvRBG25lgmudbkuFLP+Cy6xaDg="; + hash = "sha256-IKACHMKHIyq8UuqWlA6U/cdCi+wrevZwl2CINSWmmRc="; }; - patches = [ - # Upstream delegates linking on Linux to clang to make use of mold, - # but builds fine with our standard linker. - # This patch removes their linker override from the cargo config. - ./0001-linux-linker.patch - ]; - cargoPatches = [ - ./0002-fix-duplicate-reqwest.patch + ./0001-fix-duplicate-reqwest.patch ]; - postPatch = + postPatch = '' # Dynamically link WebRTC instead of static - '' - substituteInPlace $cargoDepsCopy/webrtc-sys-*/build.rs \ - --replace-fail "cargo:rustc-link-lib=static=webrtc" "cargo:rustc-link-lib=dylib=webrtc" + substituteInPlace $cargoDepsCopy/webrtc-sys-*/build.rs \ + --replace-fail "cargo:rustc-link-lib=static=webrtc" "cargo:rustc-link-lib=dylib=webrtc" - # Zed team renamed the function but forgot to update its usage in this file - # We rename it ourselves for now, until upstream fixes the issue - substituteInPlace $cargoDepsCopy/reqwest-0.12*/src/blocking/client.rs \ - --replace-fail "inner.redirect(policy)" "inner.redirect_policy(policy)" + # Zed team renamed the function but forgot to update its usage in this file + # We rename it ourselves for now, until upstream fixes the issue + substituteInPlace $cargoDepsCopy/reqwest-0.12*/src/blocking/client.rs \ + --replace-fail "inner.redirect(policy)" "inner.redirect_policy(policy)" - # The generate-licenses script wants a specific version of cargo-about eventhough - # newer versions work just as well. - substituteInPlace script/generate-licenses \ - --replace-fail '$CARGO_ABOUT_VERSION' '${cargo-about.version}' - ''; + # The generate-licenses script wants a specific version of cargo-about eventhough + # newer versions work just as well. + substituteInPlace script/generate-licenses \ + --replace-fail '$CARGO_ABOUT_VERSION' '${cargo-about.version}' + ''; - cargoHash = "sha256-Mlcpcp9/+ZoUdQUYpYX33uxNoAE4gAFh0twGFxi4tNw="; + # remove package that has a broken Cargo.toml + # see: https://github.com/NixOS/nixpkgs/pull/445924#issuecomment-3334648753 + depsExtraArgs.postBuild = '' + rm -r $out/git/*/candle-book/ + ''; + + cargoHash = "sha256-jv8ytsttXFG5VlFWI885zLJsZn8rFkiFdPhUvNKOwpY="; nativeBuildInputs = [ cmake