Skip to content

Commit

Permalink
zed-editor: 0.165.4 -> 0.166.0-pre
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaskorz committed Dec 11, 2024
1 parent 4a3e8d7 commit 3cbe736
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 80 deletions.
55 changes: 0 additions & 55 deletions pkgs/by-name/ze/zed-editor/0002-disable-livekit-darwin.patch

This file was deleted.

59 changes: 34 additions & 25 deletions pkgs/by-name/ze/zed-editor/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
darwinMinVersionHook,
makeWrapper,
nodejs_22,
libGL,
libX11,
libXext,
livekit-libwebrtc,
fetchpatch,

withGLES ? false,
}:
Expand Down Expand Up @@ -89,35 +94,27 @@ let
in
rustPlatform.buildRustPackage rec {
pname = "zed-editor";
version = "0.165.4";
version = "0.166.0-pre";

src = fetchFromGitHub {
owner = "zed-industries";
repo = "zed";
rev = "refs/tags/v${version}";
hash = "sha256-g+ZHchlxeNDkxUM306OK3BsjrvO3snF4vcQQZJSIhLc=";
tag = "v${version}";
hash = "sha256-ihK5VFZ0NDR+f+23DhccUsZk5pDZYjpCE9psYYc+be0=";
};

patches =
[
# Zed uses cargo-install to install cargo-about during the script execution.
# We provide cargo-about ourselves and can skip this step.
# Until https://github.com/zed-industries/zed/issues/19971 is fixed,
# we also skip any crate for which the license cannot be determined.
./0001-generate-licenses.patch
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# The Swift variant of livekit currently used inside Zed requires
# Swift 6, which is not available in nixpkgs yet:
# https://github.com/NixOS/nixpkgs/issues/343210
# The Rust variant of livekit for Zed is still pending and there is no
# schedule when it will be finished:
# https://github.com/zed-industries/zed/pull/13343
./0002-disable-livekit-darwin.patch
];
patches = [
# Zed uses cargo-install to install cargo-about during the script execution.
# We provide cargo-about ourselves and can skip this step.
# Until https://github.com/zed-industries/zed/issues/19971 is fixed,
# we also skip any crate for which the license cannot be determined.
./0001-generate-licenses.patch
# See https://github.com/zed-industries/zed/pull/21661#issuecomment-2524161840
"script/patches/use-cross-platform-livekit.patch"
];

useFetchCargoVendor = true;
cargoHash = "sha256-ZNXvuHX9b3T58FUs9TjpfiGYNr9J3IDbz2JE6Vy7Sg0=";
cargoHash = "sha256-Of9WQ2f9fKwjUQuoSeJMH64Y35VL+xgIf6H5r+MKtAE=";

nativeBuildInputs =
[
Expand Down Expand Up @@ -151,14 +148,16 @@ rustPlatform.buildRustPackage rec {
libxkbcommon
wayland
xorg.libxcb
# required by livekit:
libGL
libX11
libXext
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_15
# This will need to be increased to 12.3 once
# https://github.com/zed-industries/zed/pull/13343
# is merged and released, as ScreenCaptureKit is only available on 12.3 and up:
# ScreenCaptureKit, required by livekit, is only available on 12.3 and up:
# https://developer.apple.com/documentation/screencapturekit
(darwinMinVersionHook "10.15")
(darwinMinVersionHook "12.3")
];

cargoBuildFlags = [
Expand All @@ -183,6 +182,16 @@ rustPlatform.buildRustPackage rec {
ZED_UPDATE_EXPLANATION = "Zed has been installed using Nix. Auto-updates have thus been disabled.";
# Used by `zed --version`
RELEASE_VERSION = version;
LK_CUSTOM_WEBRTC = livekit-libwebrtc.overrideAttrs (
finalAttrs: prevAttrs: {
patches = prevAttrs.patches ++ [
(fetchpatch {
url = "https://github.com/zed-industries/webrtc/commit/08f7a701a2eda6407670508fc2154257a3c90308.patch";
hash = "sha256-oWYZLwqjRSHDt92MqsxsoBSMyZKj1ubNbOXZRbPpbEw=";
})
];
}
);
};

RUSTFLAGS = if withGLES then "--cfg gles" else "";
Expand Down

0 comments on commit 3cbe736

Please sign in to comment.