-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Request] Zed - Code Editor #599
Comments
It has a If you can make it work with |
So I guess It's a great opportunity to improve Nix knowledge because I've never done it before. I'll let you know when I manage to do it. |
You should note that just because it compiles does not mean it's ready. See |
If it compiles, it looks enough to have it here 😄 |
That's why I thought It would belong here because it's chaotic. Right now I'm fighting with rust development on Nix so I hope I will make it work :) |
Okay after some digging i have a good news and bad news. Good news is that (i think) I created working Nix expression to build it. Bad news is that it is not actually working but not because of me but there is an issue with linux build in general. zed-industries/zed#7015 <---- there is current Linux support status. The problem is "protoc failed: Could not make proto path relative: protocol/livekit_room.proto: No such file or directory\n"" Anyway I want to send what I created with Nix and If someone want to bother I would really appreciate feedback. Flake.nix {
description = "A flake for the Zed Code Editor";
# Specifies the Nix flake inputs
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
# Utilizes flake-utils to simplify flake creation for multiple systems
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
# Your package as a function that accepts nixpkgs as an argument
zed = pkgs.callPackage ./default.nix { pkgs;};
in
{
packages.zed = zed;
defaultPackage = zed;
devShell = pkgs.mkShell {
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = [ zed pkgs.openssl ];
};
});
} default.nix { lib, fetchFromGitHub, rustPlatform, nixpkgs, pkgs }:
rustPlatform.buildRustPackage rec {
pname = "zed";
version = "v0.122.2";
src = fetchFromGitHub {
owner = "zed-industries";
repo = pname;
rev = version;
hash = "sha256-9yrlRhifOCSv++14ZHcKZCfLja3H2oc3Ttx3ltkLUvQ=";
};
cargoLock = {
lockFile = "${src}/Cargo.lock";
allowBuiltinFetchGit = true;
};
nativeBuildInputs = [ pkgs.pkg-config pkgs.wayland pkgs.cmake pkgs.fontconfig pkgs.alsa-lib pkgs.vulkan-validation-layers pkgs.libxkbcommon pkgs.protobuf ];
buildInputs = [ pkgs.openssl pkgs.wayland pkgs.cmake pkgs.fontconfig pkgs.alsa-lib pkgs.vulkan-validation-layers pkgs.libxkbcommon pkgs.protobuf ];
meta = with lib; {
description = "Zed Code Editor";
homepage = "https://zed.dev";
license = licenses.unlicense;
maintainers = [];
};
} |
On https://aur.archlinux.org/packages/zed-editor I see that they managed to build it so I will test if it works now |
Okay so I had some progress. I managed to build Livekit Protocol from source with this. { lib, fetchFromGitHub, pkgs, buildGoModule }:
buildGoModule rec {
pname = "protocol";
version = "a2f6423fd17cb73d1b19a1161f2daa7869f1391d";
src = fetchFromGitHub {
owner = "livekit";
repo = pname;
rev = version;
hash = "sha256-2NzCBIDbm8PiDHjDiQEEH1p+CxMvRzinM0hnyAG+kgE=";
};
vendorHash = "sha256-fBGJjeXJa8Wtx1yTO56r+3tm+6IPoG+4Vh0TRORwzsQ=";
meta = with lib; {
description = "Livekit Protocol";
homepage = "https://github.com/livekit/protocol/";
license = licenses.unlicense;
maintainers = [];
};
} PKGBUILD from aur replaces default Livekit with the one built from source(If I understand it correctly). So I guess the only thing to do is to replace it in default.nix file... but I have no idea how to do it right now. On aur they do something like this cd "$_archive"
rm -r crates/live_kit_server/protocol
ln -sT "$srcdir/protocol-${_tags[protocol]}" crates/live_kit_server/protocol I already have this protocol built but I don't know how to use it to replace this crates/live_kit_server/protocol file. If someone could help I'll be glad but I will still investigate it in my free-time. |
FYI, Zed has been merged in nixpkgs : NixOS/nixpkgs#284010 |
I need to rewrite my generic git update script to properly account cargo hashes, maven hashes, and Cargo lock bumps. |
Done. Going to bump the hashes by hand, but rust compilation is slow so it will take some time to cache. |
Link to the package upstream website/repository
https://zed.dev/
https://github.com/zed-industries/zed
Utility this package has for you
Modern alternative to VS-Code that is not Vim ;)
Do you consider the package(s) to be useful for every Chaotic-Nyx user?
YES!
Do you consider the package to be useful for feature testing/preview?
Are you sure the package isn't available upstream already?
Does the package's license allow redistributing it?
YES!
Have you searched the issues to ensure this request is unique?
Have you read the README to ensure this package is not banned?
More information
It's a new code editor that got open-sourced recently. It's only available on MacOS BUT you can actually run it on Linux if you compile it from source. Since Nix is source-based I think it would be nice to have it here with most recent version from git.
The text was updated successfully, but these errors were encountered: