diff --git a/pkgs/by-name/ze/zed-editor/0002-fix-duplicate-reqwest.patch b/pkgs/by-name/ze/zed-editor/0002-fix-duplicate-reqwest.patch new file mode 100644 index 000000000000..27b49e8ddf1b --- /dev/null +++ b/pkgs/by-name/ze/zed-editor/0002-fix-duplicate-reqwest.patch @@ -0,0 +1,48 @@ +diff --git a/Cargo.lock b/Cargo.lock +index 22427fb..75a924a 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -12162,43 +12162,6 @@ dependencies = [ + "winreg 0.50.0", + ] + +-[[package]] +-name = "reqwest" +-version = "0.12.15" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb" +-dependencies = [ +- "base64 0.22.1", +- "bytes 1.10.1", +- "futures-channel", +- "futures-core", +- "futures-util", +- "http 1.3.1", +- "http-body 1.0.1", +- "http-body-util", +- "hyper 1.6.0", +- "hyper-util", +- "ipnet", +- "js-sys", +- "log", +- "mime", +- "once_cell", +- "percent-encoding", +- "pin-project-lite", +- "serde", +- "serde_json", +- "serde_urlencoded", +- "sync_wrapper 1.0.2", +- "tokio", +- "tower 0.5.2", +- "tower-service", +- "url", +- "wasm-bindgen", +- "wasm-bindgen-futures", +- "web-sys", +- "windows-registry 0.4.0", +-] +- + [[package]] + name = "reqwest" + version = "0.12.15" diff --git a/pkgs/by-name/ze/zed-editor/package.nix b/pkgs/by-name/ze/zed-editor/package.nix index a81c2544e45e..3009a0529cf1 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.184.10"; + version = "0.186.8"; outputs = [ "out" ] @@ -111,7 +111,7 @@ rustPlatform.buildRustPackage (finalAttrs: { owner = "zed-industries"; repo = "zed"; tag = "v${finalAttrs.version}"; - hash = "sha256-AtccwZueh4kJZNWR+wUkPx5pe4izyTrm4LJYe99OyaM="; + hash = "sha256-oSmwEtF8VWSKcBlL11MMThBAJFisXwWQjZAzcNIptt0="; }; patches = [ @@ -121,15 +121,24 @@ rustPlatform.buildRustPackage (finalAttrs: { ./0001-linux-linker.patch ]; + cargoPatches = [ + ./0002-fix-duplicate-reqwest.patch + ]; + 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" + + # 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)" ''; useFetchCargoVendor = true; - cargoHash = "sha256-Kd6z3oUuiqLpOC6J2GZTTQd+1bKCnJNtfBgaWJkN0ho="; + cargoHash = "sha256-WH6cQa6DChkUtqh+irIz2hJd5/RW/oln+TZPHunEmNk="; nativeBuildInputs = [