zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.54k stars 2.64k forks source link

publish zed to nixos package registry #4252

Closed brizzbuzz closed 1 month ago

brizzbuzz commented 7 months ago

Hey :) so excited this is open-sourced now.

Would love for this to be published to the nix package registry for easy installs to NixOS

srid commented 7 months ago

Adding a flake.nix to this repo would also be an useful thing to do because, in addition to being able to nix run it off this repo (without relying on nixpkgs), you can also use Nix to develop on the project.

The flake can also be used as reference for upstreaming to nixpkgs at this point, making that a simpler process.

EDIT: For those curious to see what this would look like, here's a template: https://github.com/srid/rust-nix-template ... for anything advanced, there's also crane (eg.: this Dioxus app uses it).

EDIT 2: The foreman/Procfile stuff can be ported to https://github.com/Platonic-Systems/process-compose-flake

Reverier-Xu commented 7 months ago

*zed currently only supports macOS, and getting it to support Linux may take a while of work.

gimbling-away commented 7 months ago

*zed currently only supports macOS, and getting it to support Linux may take a while of work.

Nix is available on macOS. :)

toplinuxsir commented 7 months ago

Support linux is a great idea

liberodark commented 7 months ago

I hope a package for NixOS

domenkozar commented 7 months ago

https://github.com/NixOS/nixpkgs/pull/284010

musjj commented 4 months ago

Already merged now. But an upstream flake.nix would still be nice to have to make it easier for Nix users to contribute.

boomshroom commented 4 months ago

Complication: Zed downloads its own prebuilt binary of NodeJS (currently 18.15.0; closest version in nixpkgs is 18.20.2). While less of an issue for MacOS or other Linux distros that have Nix added on, NixOS itself wouldn't be able to run the packaged version of node without nix-ld.

PedroHLC commented 3 months ago

Complication: Zed downloads its own prebuilt binary of NodeJS (currently 18.15.0

We could substituteInPlace the occurrences of zed::node_binary_path(), that would help a lot. (but then we have to install the extensions as dev)

But Zed could use having more configurable paths (Settings and/or EnvVars) because for example, the elm-language-server support is very tied to using it through their nodejs, meanwhile we could use it from drop-in executable.

libewa commented 3 months ago

but then we have to install the extensions as dev

This could be partially fixed (or worked around) by publishing the extensions to nixpkgs using a zedExtensions namespace (i.e. publishing the extensions as zedExtensions.something, like vscode does with vscodeExtensions) and installing them through home-manager. I am currently working on a home-manager module for Zed, so installing extensions with nix would also be one of my bucket list items.

libewa commented 3 months ago

I got this working using auto_install_extensions, the module is now waiting for approval in nix-community/home-manager#5455.

sokai commented 1 month ago

JFYI: https://zed.dev/blog/zed-on-linux .oO(Maybe it can help here?) KR

IvanTurgenev commented 1 month ago

Looks like it is already there

PedroHLC commented 1 month ago

yeah, this can be closed, Nixpkgs has the latest tag that can be built with rust 1.79 (and pretty sure as soon as 1.80 is in-repo we'll bump it again)