Skip to content

Commit

Permalink
zed-editor: enable livekit
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaskorz committed Nov 17, 2024
1 parent ae06731 commit a02b2fe
Show file tree
Hide file tree
Showing 2 changed files with 22 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.

47 changes: 22 additions & 25 deletions pkgs/by-name/ze/zed-editor/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
darwinMinVersionHook,
makeWrapper,
nodejs_22,
libGL,
libX11,
libXext,
callPackage,

withGLES ? false,
}:
Expand Down Expand Up @@ -90,35 +94,25 @@ let
in
rustPlatform.buildRustPackage rec {
pname = "zed-editor";
version = "0.161.2";
version = "0.163.0";

src = fetchFromGitHub {
owner = "zed-industries";
repo = "zed";
rev = "refs/tags/v${version}";
hash = "sha256-UEqlOiB7oNQcrLViPrk9ZCg4uUDYhRXjq0cHp/wclYk=";
rev = "ee207ab77ecd61fad41bb6191e978898dbfae2db";
hash = "sha256-Erm4nQbrkl5osEXDxKniyVO91DK3CTxnkhrRuews46Y=";
};

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
];

useFetchCargoVendor = true;
cargoHash = "sha256-J3pnVq2QhwKQOf6FLUlLQ1QHq42cDDN/eKZLv2WTSMc=";
cargoHash = "sha256-U6PQ0CHbRQlf3fAB/nBEZSizgpXAT5Jt373RBpyffCI=";

nativeBuildInputs =
[
Expand Down Expand Up @@ -153,14 +147,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 @@ -185,6 +181,7 @@ 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 = callPackage ./webrtc { };
};

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

0 comments on commit a02b2fe

Please sign in to comment.