zed icon indicating copy to clipboard operation
zed copied to clipboard

publish zed to nixos package registry

Open brizzbuzz opened this issue 1 year ago • 8 comments

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

brizzbuzz avatar Jan 24 '24 17:01 brizzbuzz

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

srid avatar Jan 24 '24 17:01 srid

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

Reverier-Xu avatar Jan 24 '24 18:01 Reverier-Xu

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

Nix is available on macOS. :)

gimbling-away avatar Jan 24 '24 18:01 gimbling-away

Support linux is a great idea

toplinuxsir avatar Jan 25 '24 02:01 toplinuxsir

I hope a package for NixOS

liberodark avatar Jan 25 '24 08:01 liberodark

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

domenkozar avatar Jan 26 '24 17:01 domenkozar

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

musjj avatar Apr 22 '24 11:04 musjj

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.

boomshroom avatar May 07 '24 22:05 boomshroom

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.

PedroHLC avatar May 17 '24 16:05 PedroHLC

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 avatar May 26 '24 12:05 libewa

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

libewa avatar May 27 '24 06:05 libewa

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

sokai avatar Jul 11 '24 14:07 sokai

Looks like it is already there

IvanTurgenev avatar Aug 02 '24 14:08 IvanTurgenev

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)

PedroHLC avatar Aug 02 '24 14:08 PedroHLC